From 0e151811f7b097a1917fa751c07f54cd7bbfded4 Mon Sep 17 00:00:00 2001 From: "jin0.kim" Date: Tue, 20 Jun 2017 17:05:43 +0830 Subject: Devide moments_control_xx function from moment_control_view Change-Id: Id7f59ed51e67dc51d100269cae4dcaeaf7a028b3 --- ...eature_moments_control_button_status_behavior.c | 64 +++++++++++----------- test/test_function.h | 33 +++++------ 2 files changed, 49 insertions(+), 48 deletions(-) (limited to 'test') diff --git a/test/feature_test/group_feature_moments_control_button_status_behavior.c b/test/feature_test/group_feature_moments_control_button_status_behavior.c index 5729f30..16ebde3 100755 --- a/test/feature_test/group_feature_moments_control_button_status_behavior.c +++ b/test/feature_test/group_feature_moments_control_button_status_behavior.c @@ -55,17 +55,17 @@ static void __group_set_up(void) __t__set_state_stand_alone(); __t__update_control_view(); - s_info.is_do_not_disturb = __t__get_do_not_disturb_state(); - __t__set_do_not_disturb_state(false); + s_info.is_do_not_disturb = __t__get_moments_control_do_not_disturb_state(); + __t__set_moments_control_do_not_disturb_state(false); - s_info.is_flight_mode = __t__get_flight_mode_state(); - __t__set_flight_mode_state(false); + s_info.is_flight_mode = __t__get_moments_control_flight_mode_state(); + __t__set_moments_control_flight_mode_state(false); - s_info.volume_level = __t__get_volume_level(); - __t__set_volume_level(7); + s_info.volume_level = __t__get_moments_control_volume_level(); + __t__set_moments_control_volume_level(7); - s_info.brightness_level = __t__get_brightness_level(); - __t__set_brightness_level(70); + s_info.brightness_level = __t__get_moments_control_brightness_level(); + __t__set_moments_control_brightness_level(70); TEST_GROUP_SET_UP_DONE(0.5, s_info.group); } @@ -80,10 +80,10 @@ static void __group_tear_down(void) __t__update_control_state(); __t__update_control_view(); - __t__set_do_not_disturb_state(s_info.is_do_not_disturb); - __t__set_flight_mode_state(s_info.is_flight_mode); - __t__set_volume_level(s_info.volume_level); - __t__set_brightness_level(s_info.brightness_level); + __t__set_moments_control_do_not_disturb_state(s_info.is_do_not_disturb); + __t__set_moments_control_flight_mode_state(s_info.is_flight_mode); + __t__set_moments_control_volume_level(s_info.volume_level); + __t__set_moments_control_brightness_level(s_info.brightness_level); TEST_GROUP_TEAR_DOWN_DONE(0.0, s_info.group); } @@ -141,11 +141,11 @@ unit_case_func_t __continue_check_do_not_disturb(void * data) { TEST_ASSERT_TRUE(moments_get_visible() == false); - Evas_Object *popup = __t__get_moments_do_not_disturb_popup(); + Evas_Object *popup = __t__get_moments_control_do_not_disturb_popup(); TEST_ASSERT_TRUE(popup != NULL); TEST_ASSERT_TRUE(evas_object_visible_get(popup)); - Evas_Object *layout = __t__get_moments_do_not_disturb_popup_layout(); + Evas_Object *layout = __t__get_moments_control_do_not_disturb_popup_layout(); const char *title_text = elm_object_part_text_get(layout, "elm.text.title"); TEST_ASSERT_TRUE(title_text != NULL); TEST_ASSERT_EQUAL_STRING("Do not disturb", title_text); @@ -176,7 +176,7 @@ unit_case_func_t __continue_check_do_not_disturb(void * data) TEST_ASSERT_TRUE(right_icon_image != NULL); TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/tw_ic_popup_btn_check.png", right_icon_image); - __t__do_not_disturb_popup_cancel_cb((void*)popup, NULL, NULL); + __t__moments_control_do_not_disturb_popup_cancel_cb((void*)popup, NULL, NULL); TEST_CASE_DONE(s_info.group); } @@ -184,7 +184,7 @@ unit_case_func_t __continue_check_do_not_disturb(void * data) unit_case_func_t __continue_check_cancel_button_clicked_on_do_not_disturb_popup(void * data); unit_case_func_t __case_check_cancel_button_clicked_on_do_not_disturb_popup(void * data) { - Evas_Object *popup = __t__get_moments_do_not_disturb_popup(); + Evas_Object *popup = __t__get_moments_control_do_not_disturb_popup(); if (popup == NULL) { TEST_ASSERT_TRUE(s_info.current_button != NULL); @@ -195,14 +195,14 @@ unit_case_func_t __case_check_cancel_button_clicked_on_do_not_disturb_popup(void TEST_ASSERT_TRUE(popup != NULL); TEST_ASSERT_TRUE(evas_object_visible_get(popup)); - __t__do_not_disturb_popup_cancel_cb((void*)popup, NULL, NULL); + __t__moments_control_do_not_disturb_popup_cancel_cb((void*)popup, NULL, NULL); TEST_CASE_CONTINUE(0.5, __continue_check_cancel_button_clicked_on_do_not_disturb_popup, NULL); } unit_case_func_t __continue_check_cancel_button_clicked_on_do_not_disturb_popup(void * data) { - Evas_Object *popup = __t__get_moments_do_not_disturb_popup(); + Evas_Object *popup = __t__get_moments_control_do_not_disturb_popup(); TEST_ASSERT_TRUE(popup == NULL); double val = 0.0; @@ -216,7 +216,7 @@ unit_case_func_t __continue_check_cancel_button_clicked_on_do_not_disturb_popup( unit_case_func_t __continue_check_ok_button_clicked_on_do_not_disturb_popup(void * data); unit_case_func_t __case_check_ok_button_clicked_on_do_not_disturb_popup(void * data) { - Evas_Object *popup = __t__get_moments_do_not_disturb_popup(); + Evas_Object *popup = __t__get_moments_control_do_not_disturb_popup(); if (popup == NULL) { TEST_ASSERT_TRUE(s_info.current_button != NULL); @@ -231,14 +231,14 @@ unit_case_func_t __case_check_ok_button_clicked_on_do_not_disturb_popup(void * d double val = 0.0; TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val)); - __t__do_not_disturb_popup_ok_cb((void*)popup, NULL, NULL); + __t__moments_control_do_not_disturb_popup_ok_cb((void*)popup, NULL, NULL); TEST_CASE_CONTINUE(0.6, __continue_check_ok_button_clicked_on_do_not_disturb_popup, NULL); } unit_case_func_t __continue_check_ok_button_clicked_on_do_not_disturb_popup(void * data) { - Evas_Object *popup = __t__get_moments_do_not_disturb_popup(); + Evas_Object *popup = __t__get_moments_control_do_not_disturb_popup(); TEST_ASSERT_TRUE(popup == NULL); TEST_ASSERT_TRUE(moments_get_visible() == false); @@ -281,11 +281,11 @@ unit_case_func_t __continue_check_flight_mode(void * data) { TEST_ASSERT_TRUE(moments_get_visible() == false); - Evas_Object *popup = __t__get_moments_flight_mode_popup(); + Evas_Object *popup = __t__get_moments_control_flight_mode_popup(); TEST_ASSERT_TRUE(popup != NULL); TEST_ASSERT_TRUE(evas_object_visible_get(popup)); - Evas_Object *layout = __t__get_moments_flight_mode_popup_layout(); + Evas_Object *layout = __t__get_moments_control_flight_mode_popup_layout(); const char *title_text = elm_object_part_text_get(layout, "elm.text.title"); TEST_ASSERT_TRUE(title_text != NULL); TEST_ASSERT_EQUAL_STRING("Flight mode", title_text); @@ -316,7 +316,7 @@ unit_case_func_t __continue_check_flight_mode(void * data) TEST_ASSERT_TRUE(right_icon_image != NULL); TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/tw_ic_popup_btn_check.png", right_icon_image); - __t__flight_mode_popup_cancel_cb((void*)popup, NULL, NULL); + __t__moments_control_flight_mode_popup_cancel_cb((void*)popup, NULL, NULL); TEST_CASE_DONE(s_info.group); @@ -325,7 +325,7 @@ unit_case_func_t __continue_check_flight_mode(void * data) unit_case_func_t __continue_check_cancel_button_clicked_on_flight_mode_popup(void * data); unit_case_func_t __case_check_cancel_button_clicked_on_flight_mode_popup(void * data) { - Evas_Object *popup = __t__get_moments_flight_mode_popup(); + Evas_Object *popup = __t__get_moments_control_flight_mode_popup(); if (popup == NULL) { TEST_ASSERT_TRUE(s_info.current_button != NULL); @@ -336,14 +336,14 @@ unit_case_func_t __case_check_cancel_button_clicked_on_flight_mode_popup(void * TEST_ASSERT_TRUE(popup != NULL); TEST_ASSERT_TRUE(evas_object_visible_get(popup)); - __t__flight_mode_popup_cancel_cb((void*)popup, NULL, NULL); + __t__moments_control_flight_mode_popup_cancel_cb((void*)popup, NULL, NULL); TEST_CASE_CONTINUE(0.6, __continue_check_cancel_button_clicked_on_flight_mode_popup, NULL); } unit_case_func_t __continue_check_cancel_button_clicked_on_flight_mode_popup(void * data) { - Evas_Object *popup = __t__get_moments_flight_mode_popup(); + Evas_Object *popup = __t__get_moments_control_flight_mode_popup(); TEST_ASSERT_TRUE(popup == NULL); double val = 0.0; @@ -357,7 +357,7 @@ unit_case_func_t __continue_check_cancel_button_clicked_on_flight_mode_popup(voi unit_case_func_t __continue_check_ok_button_clicked_on_flight_mode_popup(void * data); unit_case_func_t __case_check_ok_button_clicked_on_flight_mode_popup(void * data) { - Evas_Object *popup = __t__get_moments_flight_mode_popup(); + Evas_Object *popup = __t__get_moments_control_flight_mode_popup(); if (popup == NULL) { TEST_ASSERT_TRUE(s_info.current_button != NULL); @@ -372,14 +372,14 @@ unit_case_func_t __case_check_ok_button_clicked_on_flight_mode_popup(void * data double val = 0.0; TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val)); - __t__flight_mode_popup_ok_cb((void*)popup, NULL, NULL); + __t__moments_control_flight_mode_popup_ok_cb((void*)popup, NULL, NULL); TEST_CASE_CONTINUE(0.6, __continue_check_ok_button_clicked_on_flight_mode_popup, NULL); } unit_case_func_t __continue_check_ok_button_clicked_on_flight_mode_popup(void * data) { - Evas_Object *popup = __t__get_moments_flight_mode_popup(); + Evas_Object *popup = __t__get_moments_control_flight_mode_popup(); TEST_ASSERT_TRUE(popup == NULL); TEST_ASSERT_TRUE(moments_get_visible() == false); @@ -471,7 +471,7 @@ unit_case_func_t __case_check_volume_sound(void * data) const char *volume_text = elm_object_part_text_get(s_info.current_button->button_layout, CONTROLS_TEXT); if (strcmp(volume_text, "2") != 0) { - __t__set_volume_level(2); + __t__set_moments_control_volume_level(2); TEST_CASE_CONTINUE(0.6, __case_check_volume_sound, NULL); } @@ -492,7 +492,7 @@ unit_case_func_t __case_check_volume_mute(void * data) const char *volume_text = elm_object_part_text_get(s_info.current_button->button_layout, CONTROLS_TEXT); if (strcmp(volume_text, "0") != 0) { - __t__set_volume_level(0); + __t__set_moments_control_volume_level(0); TEST_CASE_CONTINUE(0.6, __case_check_volume_mute, NULL); } diff --git a/test/test_function.h b/test/test_function.h index 88e62f8..bce2d8d 100755 --- a/test/test_function.h +++ b/test/test_function.h @@ -71,22 +71,23 @@ extern int __t__get_moments_status_icon_index(int type); extern int __t__moments_restore_status_view(void); extern void __t__remove_all_icons(void); -extern Evas_Object *__t__get_moments_do_not_disturb_popup(void); -extern Evas_Object *__t__get_moments_do_not_disturb_popup_layout(void); -extern void __t__do_not_disturb_popup_cancel_cb(void *data, Evas_Object *obj, void *event_info); -extern void __t__do_not_disturb_popup_ok_cb(void *data, Evas_Object *obj, void *event_info); -extern void __t__set_do_not_disturb_state(bool state); -extern bool __t__get_do_not_disturb_state(void); -extern Evas_Object *__t__get_moments_flight_mode_popup(void); -extern Evas_Object *__t__get_moments_flight_mode_popup_layout(void); -extern void __t__set_flight_mode_state(bool state); -extern bool __t__get_flight_mode_state(void); -extern void __t__flight_mode_popup_cancel_cb(void *data, Evas_Object *obj, void *event_info); -extern void __t__flight_mode_popup_ok_cb(void *data, Evas_Object *obj, void *event_info); -extern void __t__set_volume_level(int level); -extern int __t__get_volume_level(); -extern void __t__set_brightness_level(int level); -extern int __t__get_brightness_level(void); +Eina_List * __t__get_moments_control_button_list(void); +extern Evas_Object *__t__get_moments_control_do_not_disturb_popup(void); +extern Evas_Object *__t__get_moments_control_do_not_disturb_popup_layout(void); +extern void __t__moments_control_do_not_disturb_popup_cancel_cb(void *data, Evas_Object *obj, void *event_info); +extern void __t__moments_control_do_not_disturb_popup_ok_cb(void *data, Evas_Object *obj, void *event_info); +extern void __t__set_moments_control_do_not_disturb_state(bool state); +extern bool __t__get_moments_control_do_not_disturb_state(void); +extern Evas_Object *__t__get_moments_control_flight_mode_popup(void); +extern Evas_Object *__t__get_moments_control_flight_mode_popup_layout(void); +extern void __t__set_moments_control_flight_mode_state(bool state); +extern bool __t__get_moments_control_flight_mode_state(void); +extern void __t__moments_control_flight_mode_popup_cancel_cb(void *data, Evas_Object *obj, void *event_info); +extern void __t__moments_control_flight_mode_popup_ok_cb(void *data, Evas_Object *obj, void *event_info); +extern void __t__set_moments_control_volume_level(int level); +extern int __t__get_moments_control_volume_level(); +extern void __t__set_moments_control_brightness_level(int level); +extern int __t__get_moments_control_brightness_level(void); #endif #endif -- cgit v1.2.3