diff options
author | YOUNG HUN JO <hoon.cho@samsung.com> | 2017-05-17 06:12:59 +0000 |
---|---|---|
committer | YOUNG HUN JO <hoon.cho@samsung.com> | 2017-05-17 06:12:59 +0000 |
commit | 8f0a44f2ec722a24010584fbb473a305d99e7666 (patch) | |
tree | 50a45580f12ecd0a92e3bd9377d020ad48cced82 | |
parent | feaeb8aa12f9bf572dfbec1abb66f2bbeec8bbfa (diff) | |
download | w3-home-8f0a44f2ec722a24010584fbb473a305d99e7666.tar.gz w3-home-8f0a44f2ec722a24010584fbb473a305d99e7666.tar.bz2 w3-home-8f0a44f2ec722a24010584fbb473a305d99e7666.zip |
Revert "add TEST_CASE_CONTINUE & TEST_CASE_DONE"
This reverts commit feaeb8aa12f9bf572dfbec1abb66f2bbeec8bbfa.
Change-Id: I999fcd23cece38d627bc16137860ab2a8c7babc0
-rwxr-xr-x | CMakeLists.txt | 1 | ||||
-rwxr-xr-x | src/layout.c | 2 | ||||
-rwxr-xr-x | test/feature_test/feature_test.c | 3 | ||||
-rwxr-xr-x | test/feature_test/feature_test.h | 3 | ||||
-rwxr-xr-x | test/feature_test/group_feature_moments_movement.c | 40 | ||||
-rwxr-xr-x | test/feature_test/group_feature_moments_show.c | 66 | ||||
-rwxr-xr-x | test/unit/inc/unit.h | 3 | ||||
-rwxr-xr-x | test/unit/inc/unit_group.h | 1 |
8 files changed, 18 insertions, 101 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index df1a0d8..4431ace 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,7 +221,6 @@ ADD_EXECUTABLE(${PROJECT_NAME} test/feature_test/feature_test.c test/feature_test/feature_test_log.c test/feature_test/group_feature_moments_show.c - test/feature_test/group_feature_moments_movement.c test/feature_test/group_feature_status_area_layer_show.c test/feature_test/group_feature_moments_pull_down.c test/feature_test/group_feature_moments_default_ui.c diff --git a/src/layout.c b/src/layout.c index 0518a9d..ea382a3 100755 --- a/src/layout.c +++ b/src/layout.c @@ -351,6 +351,8 @@ static void _up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) __layout_mouse_up(obj, ei->output.x, ei->output.y); } + + #if 0 static void _bezel_up_cb(void *data) { diff --git a/test/feature_test/feature_test.c b/test/feature_test/feature_test.c index 2b2e19f..4c9412d 100755 --- a/test/feature_test/feature_test.c +++ b/test/feature_test/feature_test.c @@ -13,9 +13,8 @@ void feature_test(void) unit_clear_log(); TEST_GROUP_ADD("group_feature_moments_show", group_feature_moments_show); - TEST_GROUP_ADD("group_feature_moments_pull_down", group_feature_moments_pull_down); - TEST_GROUP_ADD("group_feature_moments_movement", group_feature_moments_movement); TEST_GROUP_ADD("group_feature_status_area_layer_show", group_feature_status_area_layer_show); + TEST_GROUP_ADD("group_feature_moments_pull_down", group_feature_moments_pull_down); TEST_GROUP_ADD("group_feature_moments_default_ui", group_feature_moments_default_ui); TEST_GROUP_ADD("group_feature_moments_vi", group_feature_moments_vi); TEST_GROUP_ADD("group_feature_moments_status_view_create", group_feature_moments_status_view_create); diff --git a/test/feature_test/feature_test.h b/test/feature_test/feature_test.h index e01fa3a..f61c5c6 100755 --- a/test/feature_test/feature_test.h +++ b/test/feature_test/feature_test.h @@ -10,9 +10,8 @@ void feature_test(void); void group_feature_moments_show(unit_group_t * group); -void group_feature_moments_pull_down(unit_group_t * group); -void group_feature_moments_movement(unit_group_t * group); void group_feature_status_area_layer_show(unit_group_t * group); +void group_feature_moments_pull_down(unit_group_t * group); void group_feature_moments_default_ui(unit_group_t * group); void group_feature_moments_vi(unit_group_t * group); void group_feature_moments_status_view_create(unit_group_t * group); diff --git a/test/feature_test/group_feature_moments_movement.c b/test/feature_test/group_feature_moments_movement.c deleted file mode 100755 index 4240571..0000000 --- a/test/feature_test/group_feature_moments_movement.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "test.h" -#if TEST_MODE - -#include "feature_test.h" -#include "moments/moments.h" -#include "home_app_manager.h" -#include "common_conf.h" -#include "moments/moments_view_conf.h" -#include "../test_function.h" - -#include <Elementary.h> -#include <app.h> - -static struct { - unit_group_t * group; -} s_info = { - .group = NULL, -}; - -static void __set_up(void) -{ - s_info.group->set_up_complete(s_info.group); -} - -static void __tear_down(void) -{ - s_info.group->tear_down_complete(s_info.group); -} - -void group_feature_moments_movement(unit_group_t * group) -{ - s_info.group = group; - s_info.group->set_up = __set_up; - s_info.group->tear_down = __tear_down; - - TEST_GROUP_RUN(s_info.group); -} - -#endif - diff --git a/test/feature_test/group_feature_moments_show.c b/test/feature_test/group_feature_moments_show.c index 0165c5e..4334407 100755 --- a/test/feature_test/group_feature_moments_show.c +++ b/test/feature_test/group_feature_moments_show.c @@ -39,23 +39,6 @@ static void __tear_down(void) s_info.group->tear_down_complete(s_info.group); } -static Eina_Bool __check_bar_state_half(void * data); -static Eina_Bool __case_touch_valid_area(void * data) -{ - position_t *pos = (position_t *)data; - - main_s * info = main_get_info(); - TEST_ASSERT_TRUE_UPGRADE(info != NULL); - TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL); - - TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false); - - __t__layout_mouse_down(info->layout, pos->x, pos->y); - TEST_ASSERT_TRUE_UPGRADE(moments_get_visible()); - - TEST_CASE_CONTINUE(0.6, __check_bar_state_half, NULL); -} - static Eina_Bool __check_bar_state_half(void * data) { Evas_Object * layout = __t__get_moments_view_layout(); @@ -71,9 +54,11 @@ static Eina_Bool __check_bar_state_half(void * data) TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h); TEST_CASE_DONE(s_info.group); + + return ECORE_CALLBACK_CANCEL; } -static Eina_Bool __case_touch_invalid_area(void * data) +static Eina_Bool __case_touch_valid_area(void * data) { position_t *pos = (position_t *)data; @@ -84,52 +69,29 @@ static Eina_Bool __case_touch_invalid_area(void * data) TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false); __t__layout_mouse_down(info->layout, pos->x, pos->y); - TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false); - - TEST_CASE_DONE(s_info.group); -} - -static Eina_Bool __touch_up(void * data); -static Eina_Bool __check_bar_state_hide(void * data); -static Eina_Bool __case_touch_up_vaild_area(void * data) -{ - main_s * info = main_get_info(); - __t__layout_mouse_down(info->layout, 180, 50); TEST_ASSERT_TRUE_UPGRADE(moments_get_visible()); - TEST_CASE_CONTINUE(0.6, __touch_up, NULL); + ecore_timer_add(0.6, __check_bar_state_half, NULL); + + return EINA_TRUE; } -static Eina_Bool __touch_up(void * data) +static Eina_Bool __case_touch_invalid_area(void * data) { + position_t *pos = (position_t *)data; + main_s * info = main_get_info(); TEST_ASSERT_TRUE_UPGRADE(info != NULL); TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL); - TEST_ASSERT_TRUE_UPGRADE(moments_get_visible()); - - __t__layout_mouse_up(info->layout, 180, 50); - TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false); - TEST_CASE_CONTINUE(0.6, __check_bar_state_hide, NULL); -} - -static Eina_Bool __check_bar_state_hide(void * data) -{ - Evas_Object * layout = __t__get_moments_view_layout(); - TEST_ASSERT_TRUE_UPGRADE(layout != NULL); - TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == EINA_FALSE); - - int x = 0, y = 0, w = 0, h = 0; - evas_object_geometry_get(layout, &x, &y, &w, &h); - - TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X, x); - TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, y); - TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w); - TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h); + __t__layout_mouse_down(info->layout, pos->x, pos->y); + TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false); TEST_CASE_DONE(s_info.group); + + return EINA_TRUE; } void group_feature_moments_show(unit_group_t * group) @@ -145,8 +107,6 @@ void group_feature_moments_show(unit_group_t * group) TEST_CASE_ADD(s_info.group, __case_touch_valid_area, &valid_pos[3]); TEST_CASE_ADD(s_info.group, __case_touch_valid_area, &valid_pos[4]); - TEST_CASE_ADD(s_info.group, __case_touch_up_vaild_area, &valid_pos[0]); - static position_t invalid_pos[6] = { {100, 50}, {260, 50}, {180, 90}, {0, 0}, {360, 360}, {180, 180} }; TEST_CASE_ADD(s_info.group, __case_touch_invalid_area, &invalid_pos[0]); TEST_CASE_ADD(s_info.group, __case_touch_invalid_area, &invalid_pos[1]); diff --git a/test/unit/inc/unit.h b/test/unit/inc/unit.h index b0742b9..489b88a 100755 --- a/test/unit/inc/unit.h +++ b/test/unit/inc/unit.h @@ -17,8 +17,7 @@ #define TEST_CASE_ADD(group, case_starter, data) unit_group_add_case(group, case_starter, data) #define TEST_GROUP_RUN(group) unit_group_run(group) -#define TEST_CASE_CONTINUE(sec, next_func, data) { ecore_timer_add(sec, next_func, data); return EINA_TRUE; } -#define TEST_CASE_DONE(group) { unit_group_case_done(group); return ECORE_CALLBACK_CANCEL; } +#define TEST_CASE_DONE(group) unit_group_case_done(group) #define TEST_CASE_FAIL unit_case_fail #define TEST_CASE(group, case_starter) { \ diff --git a/test/unit/inc/unit_group.h b/test/unit/inc/unit_group.h index 5bd618a..b540925 100755 --- a/test/unit/inc/unit_group.h +++ b/test/unit/inc/unit_group.h @@ -33,7 +33,6 @@ void unit_group_add_case(unit_group_t * group, Eina_Bool(*case_starter)(void * d void unit_group_run(unit_group_t * group); void unit_group_case_fail(unit_group_t * group); -void unit_group_case_done(unit_group_t * group); #endif |