upgrade test unit & remove build warning 20/134620/2
authorYoungHun Cho <hoon.cho@samsung.com>
Mon, 19 Jun 2017 12:01:54 +0000 (21:01 +0900)
committerYOUNG HUN JO <hoon.cho@samsung.com>
Mon, 19 Jun 2017 12:05:57 +0000 (12:05 +0000)
Change-Id: I6c89b5411c015489de320310deddee4fc441d43c

41 files changed:
src/layout.c
src/moments/moments_control_view.c
src/moments/moments_status_view.c [changed mode: 0644->0755]
test/feature_test/feature_test.h
test/feature_test/group_feature_moments_control_button_status_behavior.c
test/feature_test/group_feature_moments_controls_show.c
test/feature_test/group_feature_moments_controls_state.c
test/feature_test/group_feature_moments_default_ui.c
test/feature_test/group_feature_moments_pull_down.c
test/feature_test/group_feature_moments_show.c
test/feature_test/group_feature_moments_status_behavior.c
test/feature_test/group_feature_moments_status_view_ui.c
test/feature_test/group_feature_moments_vi.c
test/feature_test/group_feature_status_area_layer_show.c
test/function_test/group_function_moments_status_view.c
test/function_test/group_function_moments_view.c
test/test_function.h
test/test_main.c
test/unit/inc/unit.h
test/unit/inc/unit_assert.h
test/unit/inc/unit_group.h
test/unit/inc/unit_log_buf.h [changed mode: 0644->0755]
test/unit/inc/unit_result.h [changed mode: 0644->0755]
test/unit/unit.c
test/unit/unit_assert.c
test/unit/unit_group.c
test/unit/unit_log_buf.c
test/unit/unit_result.c [changed mode: 0644->0755]
test/unit/unit_test/unit_test_append_log/unit_test_append_log.c
test/unit/unit_test/unit_test_append_log/unit_test_append_log.h
test/unit/unit_test/unit_test_assert_test/unit_test_assert.c
test/unit/unit_test/unit_test_assert_test/unit_test_assert.h
test/unit/unit_test/unit_test_function_test/unit_test_function.c
test/unit/unit_test/unit_test_function_test/unit_test_function.h
test/unit/unit_test/unit_test_function_test/unit_test_group_function.c
test/unit/unit_test/unit_test_function_test/unit_test_log_buf_function.c
test/unit/unit_test/unit_test_function_test/unit_test_unit_function.c
test/unit/unit_test/unit_test_group_test/unit_test_group.c
test/unit/unit_test/unit_test_group_test/unit_test_group.h
test/unit/unit_test/unit_test_group_test/unit_test_group_result.c
test/unit/unit_test/unit_test_main.c

index 9e5a6e4f74ec32ed1d862d30a469721279241d6b..e8cdd8ed644a95694fa0690fbbe4e70cf9dd6e5c 100755 (executable)
@@ -198,7 +198,7 @@ static Eina_Bool _longpress_timer_cb(void *data)
                }
                app_control_h app_control_handle = NULL;
                app_control_create(&app_control_handle);
-               app_control_set_package(app_control_handle, "org.tizen.watch-setting");
+               app_control_set_app_id(app_control_handle, "org.tizen.watch-setting");
                app_control_add_extra_data(app_control_handle, "launch-type", "watchface");
                app_control_send_launch_request(app_control_handle, NULL, NULL);
                app_control_destroy(app_control_handle);
index 080175052a5fa40a1b90eb2180270eba4376fede..44db30cd4544193922bf2af398bd58096594eb66 100755 (executable)
@@ -126,7 +126,7 @@ void moments_control_init(void)
        __update_control_view();
        __do_not_disturb_status_changed_cb(NULL, NULL);
        __flight_mode_status_changed_cb(NULL, NULL);
-       __volume_status_changed_cb(0, NULL, NULL);
+       __volume_status_changed_cb(0, 0, NULL);
        __brightness_status_changed_cb();
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index a7a795c..bb5dc1b
@@ -665,29 +665,11 @@ static Evas_Object *__create_callforwarding(Evas_Object *parent)
        return callforwarding;
 }
 
-static int __get_icon_position_index(status_icon_type_e type)
-{
-       Eina_List *list = NULL;
-       void *data = NULL;
-
-       int i = 0;
-       EINA_LIST_FOREACH(__status_icon_type_list, list, data) {
-               status_icon_type_e type_in_list = (status_icon_type_e)data;
-               if (type == type_in_list) return i;
-               i++;
-       }
-       return -1;
-}
-
 static void __remove_all_icons(void)
 {
-       Eina_List *list = NULL;
-       void *data = NULL;
-       int i = 0;
+       __status_icon_type_list = eina_list_free(__status_icon_type_list);
 
-       EINA_LIST_FOREACH(__status_icon_type_list, list, data) {
-               __status_icon_type_list = eina_list_remove_list(__status_icon_type_list, list);
-       }
+       int i = 0;
        for (i = 0; i < STATUS_ICON_MAX_COUNT; i++)
        {
                if (s_info.icon_array[i]) {
@@ -751,6 +733,20 @@ Evas_Object *__t__get_moments_status_callforwarding(void)
        return s_info.icon_array[STATUS_ICON_CALLFORWARDING];
 }
 
+static int __get_icon_position_index(status_icon_type_e type)
+{
+       Eina_List *list = NULL;
+       void *data = NULL;
+
+       int i = 0;
+       EINA_LIST_FOREACH(__status_icon_type_list, list, data) {
+               status_icon_type_e type_in_list = (status_icon_type_e)data;
+               if (type == type_in_list) return i;
+               i++;
+       }
+       return -1;
+}
+
 int __t__get_moments_status_icon_index(int type)
 {
        return __get_icon_position_index(type);
index 3e985099d7a809fd995112bf00fb84f6e81d3182..93a1c29ae98de6d74174acd417db21244ab883b0 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __FEATURE_TEST__
 #define __FEATURE_TEST__
 
index 2b11f4865ad7cf8e6f3d3d707684d2d49ad6b809..40ced8ff2bb9c525d712a647bc2418e596ca0791 100755 (executable)
@@ -97,7 +97,7 @@ unit_case_func_t __continue_check_do_not_disturb(void * data);
 unit_case_func_t __case_check_do_not_disturb(void * data)
 {
        Eina_List *button_list = __t__get_moments_control_button_list();
-       TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+       TEST_ASSERT_TRUE(button_list != NULL);
 
        Eina_List *l = NULL;
        control_info_t *button = NULL;
@@ -108,13 +108,13 @@ unit_case_func_t __case_check_do_not_disturb(void * data)
                }
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+       TEST_ASSERT_TRUE(button != NULL);
        s_info.current_button = button;
 
        double val = 0.0;
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR, &val));
+       TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR, &val));
 
-       TEST_ASSERT_TRUE_UPGRADE(button->pressed != NULL);
+       TEST_ASSERT_TRUE(button->pressed != NULL);
 
        button->pressed(NULL, NULL, NULL, NULL);
 
@@ -123,42 +123,42 @@ unit_case_func_t __case_check_do_not_disturb(void * data)
 
 unit_case_func_t __continue_check_do_not_disturb(void * data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        Evas_Object *popup = __t__get_moments_do_not_disturb_popup();
-       TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(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();
        const char *title_text = elm_object_part_text_get(layout, "elm.text.title");
-       TEST_ASSERT_TRUE_UPGRADE(title_text != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("Do not disturb", title_text);
+       TEST_ASSERT_TRUE(title_text != NULL);
+       TEST_ASSERT_EQUAL_STRING("Do not disturb", title_text);
 
        const char *contents_text = elm_object_part_text_get(layout, "elm.text");
-       TEST_ASSERT_TRUE_UPGRADE(contents_text != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("Sounds will be muted and screen will remain turned off for incoming calls and alerts, but not alarms.", contents_text);
+       TEST_ASSERT_TRUE(contents_text != NULL);
+       TEST_ASSERT_EQUAL_STRING("Sounds will be muted and screen will remain turned off for incoming calls and alerts, but not alarms.", contents_text);
 
        Evas_Object *left_btn = elm_object_part_content_get(popup, "button1");
-       TEST_ASSERT_TRUE_UPGRADE(left_btn != NULL);
+       TEST_ASSERT_TRUE(left_btn != NULL);
 
        Evas_Object *left_btn_icon = elm_object_part_content_get(left_btn, "elm.swallow.content");
-       TEST_ASSERT_TRUE_UPGRADE(left_btn_icon != NULL);
+       TEST_ASSERT_TRUE(left_btn_icon != NULL);
 
        const char *left_icon_image = NULL;
        elm_image_file_get(left_btn_icon, &left_icon_image , NULL);
-       TEST_ASSERT_TRUE_UPGRADE(left_icon_image  != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/tw_ic_popup_btn_delete.png", left_icon_image);
+       TEST_ASSERT_TRUE(left_icon_image  != NULL);
+       TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/tw_ic_popup_btn_delete.png", left_icon_image);
 
        Evas_Object *right_btn = elm_object_part_content_get(popup, "button2");
-       TEST_ASSERT_TRUE_UPGRADE(right_btn != NULL);
+       TEST_ASSERT_TRUE(right_btn != NULL);
 
        Evas_Object *right_btn_icon = elm_object_part_content_get(right_btn, "elm.swallow.content");
-       TEST_ASSERT_TRUE_UPGRADE(right_btn_icon != NULL);
+       TEST_ASSERT_TRUE(right_btn_icon != NULL);
 
        const char *right_icon_image = NULL;
        elm_image_file_get(right_btn_icon, &right_icon_image, NULL);
-       TEST_ASSERT_TRUE_UPGRADE(right_icon_image  != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/tw_ic_popup_btn_check.png", right_icon_image);
+       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);
 
@@ -170,14 +170,14 @@ unit_case_func_t __case_check_cancel_button_clicked_on_do_not_disturb_popup(void
 {
        Evas_Object *popup = __t__get_moments_do_not_disturb_popup();
        if (popup == NULL) {
-               TEST_ASSERT_TRUE_UPGRADE(s_info.current_button != NULL);
+               TEST_ASSERT_TRUE(s_info.current_button != NULL);
 
                s_info.current_button->pressed(s_info.current_button, NULL, NULL, NULL);
                TEST_CASE_CONTINUE(0.2, __case_check_cancel_button_clicked_on_do_not_disturb_popup, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+       TEST_ASSERT_TRUE(popup != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(popup));
 
        __t__do_not_disturb_popup_cancel_cb((void*)popup, NULL, NULL);
 
@@ -187,12 +187,12 @@ unit_case_func_t __case_check_cancel_button_clicked_on_do_not_disturb_popup(void
 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();
-       TEST_ASSERT_TRUE_UPGRADE(popup == NULL);
+       TEST_ASSERT_TRUE(popup == NULL);
 
        double val = 0.0;
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+       TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -203,17 +203,17 @@ unit_case_func_t __case_check_ok_button_clicked_on_do_not_disturb_popup(void * d
        Evas_Object *popup = __t__get_moments_do_not_disturb_popup();
 
        if (popup == NULL) {
-               TEST_ASSERT_TRUE_UPGRADE(s_info.current_button != NULL);
+               TEST_ASSERT_TRUE(s_info.current_button != NULL);
 
                s_info.current_button->pressed(s_info.current_button, NULL, NULL, NULL);
                TEST_CASE_CONTINUE(0.2, __case_check_ok_button_clicked_on_do_not_disturb_popup, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+       TEST_ASSERT_TRUE(popup != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(popup));
 
        double val = 0.0;
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+       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);
 
@@ -223,12 +223,12 @@ unit_case_func_t __case_check_ok_button_clicked_on_do_not_disturb_popup(void * d
 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();
-       TEST_ASSERT_TRUE_UPGRADE(popup == NULL);
+       TEST_ASSERT_TRUE(popup == NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        double val = 0.0;
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("on", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+       TEST_ASSERT_EQUAL_STRING("on", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -237,7 +237,7 @@ unit_case_func_t __continue_check_flight_mode(void * data);
 unit_case_func_t __case_check_flight_mode(void * data)
 {
        Eina_List *button_list = __t__get_moments_control_button_list();
-       TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+       TEST_ASSERT_TRUE(button_list != NULL);
 
        Eina_List *l = NULL;
        control_info_t *button = NULL;
@@ -248,13 +248,13 @@ unit_case_func_t __case_check_flight_mode(void * data)
                }
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+       TEST_ASSERT_TRUE(button != NULL);
        s_info.current_button = button;
 
        double val = 0.0;
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR, &val));
+       TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR, &val));
 
-       TEST_ASSERT_TRUE_UPGRADE(button->pressed != NULL);
+       TEST_ASSERT_TRUE(button->pressed != NULL);
 
        button->pressed(NULL, NULL, NULL, NULL);
 
@@ -263,42 +263,42 @@ unit_case_func_t __case_check_flight_mode(void * data)
 
 unit_case_func_t __continue_check_flight_mode(void * data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        Evas_Object *popup = __t__get_moments_flight_mode_popup();
-       TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+       TEST_ASSERT_TRUE(popup != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(popup));
 
        Evas_Object *layout = __t__get_moments_flight_mode_popup_layout();
        const char *title_text = elm_object_part_text_get(layout, "elm.text.title");
-       TEST_ASSERT_TRUE_UPGRADE(title_text != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("Flight mode", title_text);
+       TEST_ASSERT_TRUE(title_text != NULL);
+       TEST_ASSERT_EQUAL_STRING("Flight mode", title_text);
 
        const char *contents_text = elm_object_part_text_get(layout, "elm.text");
-       TEST_ASSERT_TRUE_UPGRADE(contents_text != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("disables calls, messaging and all connections. To use Wi-Fi and Bluetooth, go to Settings.", contents_text);
+       TEST_ASSERT_TRUE(contents_text != NULL);
+       TEST_ASSERT_EQUAL_STRING("disables calls, messaging and all connections. To use Wi-Fi and Bluetooth, go to Settings.", contents_text);
 
        Evas_Object *left_btn = elm_object_part_content_get(popup, "button1");
-       TEST_ASSERT_TRUE_UPGRADE(left_btn != NULL);
+       TEST_ASSERT_TRUE(left_btn != NULL);
 
        Evas_Object *left_btn_icon = elm_object_part_content_get(left_btn, "elm.swallow.content");
-       TEST_ASSERT_TRUE_UPGRADE(left_btn_icon != NULL);
+       TEST_ASSERT_TRUE(left_btn_icon != NULL);
 
        const char *left_icon_image = NULL;
        elm_image_file_get(left_btn_icon, &left_icon_image , NULL);
-       TEST_ASSERT_TRUE_UPGRADE(left_icon_image  != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/tw_ic_popup_btn_delete.png", left_icon_image);
+       TEST_ASSERT_TRUE(left_icon_image  != NULL);
+       TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/tw_ic_popup_btn_delete.png", left_icon_image);
 
        Evas_Object *right_btn = elm_object_part_content_get(popup, "button2");
-       TEST_ASSERT_TRUE_UPGRADE(right_btn != NULL);
+       TEST_ASSERT_TRUE(right_btn != NULL);
 
        Evas_Object *right_btn_icon = elm_object_part_content_get(right_btn, "elm.swallow.content");
-       TEST_ASSERT_TRUE_UPGRADE(right_btn_icon != NULL);
+       TEST_ASSERT_TRUE(right_btn_icon != NULL);
 
        const char *right_icon_image = NULL;
        elm_image_file_get(right_btn_icon, &right_icon_image, NULL);
-       TEST_ASSERT_TRUE_UPGRADE(right_icon_image  != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/tw_ic_popup_btn_check.png", right_icon_image);
+       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);
 
@@ -311,14 +311,14 @@ unit_case_func_t __case_check_cancel_button_clicked_on_flight_mode_popup(void *
 {
        Evas_Object *popup = __t__get_moments_flight_mode_popup();
        if (popup == NULL) {
-               TEST_ASSERT_TRUE_UPGRADE(s_info.current_button != NULL);
+               TEST_ASSERT_TRUE(s_info.current_button != NULL);
 
                s_info.current_button->pressed(s_info.current_button, NULL, NULL, NULL);
                TEST_CASE_CONTINUE(0.2, __case_check_cancel_button_clicked_on_flight_mode_popup, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+       TEST_ASSERT_TRUE(popup != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(popup));
 
        __t__flight_mode_popup_cancel_cb((void*)popup, NULL, NULL);
 
@@ -328,12 +328,12 @@ unit_case_func_t __case_check_cancel_button_clicked_on_flight_mode_popup(void *
 unit_case_func_t __continue_check_cancel_button_clicked_on_flight_mode_popup(void * data)
 {
        Evas_Object *popup = __t__get_moments_flight_mode_popup();
-       TEST_ASSERT_TRUE_UPGRADE(popup == NULL);
+       TEST_ASSERT_TRUE(popup == NULL);
 
        double val = 0.0;
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+       TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -344,17 +344,17 @@ unit_case_func_t __case_check_ok_button_clicked_on_flight_mode_popup(void * data
        Evas_Object *popup = __t__get_moments_flight_mode_popup();
 
        if (popup == NULL) {
-               TEST_ASSERT_TRUE_UPGRADE(s_info.current_button != NULL);
+               TEST_ASSERT_TRUE(s_info.current_button != NULL);
 
                s_info.current_button->pressed(s_info.current_button, NULL, NULL, NULL);
                TEST_CASE_CONTINUE(0.2, __case_check_ok_button_clicked_on_flight_mode_popup, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(popup != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(popup));
+       TEST_ASSERT_TRUE(popup != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(popup));
 
        double val = 0.0;
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+       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);
 
@@ -364,12 +364,12 @@ unit_case_func_t __case_check_ok_button_clicked_on_flight_mode_popup(void * data
 unit_case_func_t __continue_check_ok_button_clicked_on_flight_mode_popup(void * data)
 {
        Evas_Object *popup = __t__get_moments_flight_mode_popup();
-       TEST_ASSERT_TRUE_UPGRADE(popup == NULL);
+       TEST_ASSERT_TRUE(popup == NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        double val = 0.0;
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("on", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
+       TEST_ASSERT_EQUAL_STRING("on", edje_object_part_state_get(elm_layout_edje_get(s_info.current_button->button_layout), CONTROLS_BAR, &val));
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -378,7 +378,7 @@ unit_case_func_t __continue_check_volume(void * data);
 unit_case_func_t __case_check_volume(void * data)
 {
        Eina_List *button_list = __t__get_moments_control_button_list();
-       TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+       TEST_ASSERT_TRUE(button_list != NULL);
 
        Eina_List *l = NULL;
        control_info_t *button = NULL;
@@ -389,20 +389,20 @@ unit_case_func_t __case_check_volume(void * data)
                }
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+       TEST_ASSERT_TRUE(button != NULL);
        s_info.current_button = button;
 
        const char *volume_text = elm_object_part_text_get(button->button_layout, CONTROLS_TEXT);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("7", volume_text);
+       TEST_ASSERT_EQUAL_STRING("7", volume_text);
 
        Evas_Object *icon = elm_object_part_content_get(button->button_layout, CONTROLS_ICON);
        const char *icon_image = NULL;
        elm_image_file_get(icon, &icon_image, NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(icon_image != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/multimedia.png", icon_image);
+       TEST_ASSERT_TRUE(icon_image != NULL);
+       TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/multimedia.png", icon_image);
 
-       TEST_ASSERT_TRUE_UPGRADE(button->pressed != NULL);
+       TEST_ASSERT_TRUE(button->pressed != NULL);
 
        button->pressed(NULL, NULL, NULL, NULL);
 
@@ -411,41 +411,41 @@ unit_case_func_t __case_check_volume(void * data)
 
 unit_case_func_t __continue_check_volume(void * data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        app_context_h setting_app_context = NULL;
        int ret = APP_MANAGER_ERROR_NONE;
 
        ret = app_manager_get_app_context("org.tizen.watch-setting", &setting_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        app_state_e setting_app_state = APP_STATE_UNDEFINED;
        ret = app_context_get_app_state(setting_app_context , &setting_app_state);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_STATE_FOREGROUND, setting_app_state);
+       TEST_ASSERT_EQUAL_INT(APP_STATE_FOREGROUND, setting_app_state);
 
        app_context_h home_app_context = NULL;
        ret = app_manager_get_app_context(PACKAGE, &home_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        app_state_e home_app_state = APP_STATE_UNDEFINED;
        ret = app_context_get_app_state(home_app_context , &home_app_state);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_STATE_BACKGROUND, home_app_state);
+       TEST_ASSERT_EQUAL_INT(APP_STATE_BACKGROUND, home_app_state);
 
        ret = app_manager_resume_app(home_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        ret = app_manager_request_terminate_bg_app(setting_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        ret = app_context_destroy(home_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        ret = app_context_destroy(setting_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -459,14 +459,14 @@ unit_case_func_t __case_check_volume_sound(void * data)
                TEST_CASE_CONTINUE(0.6, __case_check_volume_sound, NULL);
        }
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("2", volume_text);
+       TEST_ASSERT_EQUAL_STRING("2", volume_text);
 
        Evas_Object *icon = elm_object_part_content_get(s_info.current_button->button_layout, CONTROLS_ICON);
        const char *icon_image = NULL;
        elm_image_file_get(icon, &icon_image, NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(icon_image != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/multimedia.png", icon_image);
+       TEST_ASSERT_TRUE(icon_image != NULL);
+       TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/multimedia.png", icon_image);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -480,14 +480,14 @@ unit_case_func_t __case_check_volume_mute(void * data)
                TEST_CASE_CONTINUE(0.6, __case_check_volume_mute, NULL);
        }
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("0", volume_text);
+       TEST_ASSERT_EQUAL_STRING("0", volume_text);
 
        Evas_Object *icon = elm_object_part_content_get(s_info.current_button->button_layout, CONTROLS_ICON);
        const char *icon_image = NULL;
        elm_image_file_get(icon, &icon_image, NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(icon_image != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/multimedia_off.png", icon_image);
+       TEST_ASSERT_TRUE(icon_image != NULL);
+       TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/multimedia_off.png", icon_image);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -496,7 +496,7 @@ unit_case_func_t __continue_check_brightness(void * data);
 unit_case_func_t __case_check_brightness(void * data)
 {
        Eina_List *button_list = __t__get_moments_control_button_list();
-       TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+       TEST_ASSERT_TRUE(button_list != NULL);
 
        Eina_List *l = NULL;
        control_info_t *button = NULL;
@@ -507,20 +507,20 @@ unit_case_func_t __case_check_brightness(void * data)
                }
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+       TEST_ASSERT_TRUE(button != NULL);
        s_info.current_button = button;
 
        const char *brightness_text = elm_object_part_text_get(button->button_layout, CONTROLS_TEXT);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("7", brightness_text);
+       TEST_ASSERT_EQUAL_STRING("7", brightness_text);
 
        Evas_Object *icon = elm_object_part_content_get(button->button_layout, CONTROLS_ICON);
        const char *icon_image = NULL;
        elm_image_file_get(icon, &icon_image, NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(icon_image != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(IMAGEDIR"/brightness.png", icon_image);
+       TEST_ASSERT_TRUE(icon_image != NULL);
+       TEST_ASSERT_EQUAL_STRING(IMAGEDIR"/brightness.png", icon_image);
 
-       TEST_ASSERT_TRUE_UPGRADE(button->pressed != NULL);
+       TEST_ASSERT_TRUE(button->pressed != NULL);
 
        button->pressed(NULL, NULL, NULL, NULL);
 
@@ -529,41 +529,41 @@ unit_case_func_t __case_check_brightness(void * data)
 
 unit_case_func_t __continue_check_brightness(void * data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        app_context_h setting_app_context = NULL;
        int ret = APP_MANAGER_ERROR_NONE;
 
        ret = app_manager_get_app_context("org.tizen.watch-setting", &setting_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        app_state_e setting_app_state = APP_STATE_UNDEFINED;
        ret = app_context_get_app_state(setting_app_context , &setting_app_state);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_STATE_FOREGROUND, setting_app_state);
+       TEST_ASSERT_EQUAL_INT(APP_STATE_FOREGROUND, setting_app_state);
 
        app_context_h home_app_context = NULL;
        ret = app_manager_get_app_context(PACKAGE, &home_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        app_state_e home_app_state = APP_STATE_UNDEFINED;
        ret = app_context_get_app_state(home_app_context , &home_app_state);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_STATE_BACKGROUND, home_app_state);
+       TEST_ASSERT_EQUAL_INT(APP_STATE_BACKGROUND, home_app_state);
 
        ret = app_manager_resume_app(home_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        ret = app_manager_request_terminate_bg_app(setting_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        ret = app_context_destroy(home_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        ret = app_context_destroy(setting_app_context);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(APP_MANAGER_ERROR_NONE, ret);
+       TEST_ASSERT_EQUAL_INT(APP_MANAGER_ERROR_NONE, ret);
 
        TEST_CASE_DONE(s_info.group);
 }
index 11171644b75f2f0623ce679d1af30c5193f634c2..b2ca62d7a6337b72ab461da314510907bcd89cdb 100755 (executable)
@@ -60,7 +60,7 @@ static unit_case_func_t __continue_check_control_button(void * data);
 static unit_case_func_t __case_show_control_button(void * data)
 {
        Evas_Object *control_layout = __t__get_moments_control_layout();
-       TEST_ASSERT_TRUE_UPGRADE(control_layout != NULL);
+       TEST_ASSERT_TRUE(control_layout != NULL);
 
        moments_control_clear_button_list();
 
@@ -69,8 +69,8 @@ static unit_case_func_t __case_show_control_button(void * data)
 
        for (i=0; i< count ; i++) {
                control_info_t *new_button =  moments_control_create_button(control_layout, i);
-               TEST_ASSERT_TRUE_UPGRADE(new_button != NULL);
-               TEST_ASSERT_TRUE_UPGRADE(new_button->button_layout != NULL);
+               TEST_ASSERT_TRUE(new_button != NULL);
+               TEST_ASSERT_TRUE(new_button->button_layout != NULL);
 
                moments_control_push_to_button_list(new_button);
        }
@@ -83,7 +83,7 @@ static unit_case_func_t __case_show_control_button(void * data)
 static unit_case_func_t __continue_check_control_button(void * data)
 {
        Eina_List *button_list = __t__get_moments_control_button_list();
-       TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+       TEST_ASSERT_TRUE(button_list != NULL);
 
        int i = 0;
        int count = (int)data;
@@ -91,8 +91,8 @@ static unit_case_func_t __continue_check_control_button(void * data)
        for (i=0; i<count ; i++) {
                control_info_t *button = eina_list_nth(button_list, i);
 
-               TEST_ASSERT_TRUE_UPGRADE(button->button_layout != NULL);
-               TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(button->button_layout));
+               TEST_ASSERT_TRUE(button->button_layout != NULL);
+               TEST_ASSERT_TRUE(evas_object_visible_get(button->button_layout));
 
                int x = 0, y = 0, w = 0, h = 0;
                evas_object_geometry_get(button->button_layout, &x, &y, &w, &h);
@@ -100,10 +100,10 @@ static unit_case_func_t __continue_check_control_button(void * data)
                int total = eina_list_count(button_list);
                position_t *pos = moments_control_get_button_position(total, i);
 
-               TEST_ASSERT_EQUAL_INT_UPGRADE(pos->x, x);
-               TEST_ASSERT_EQUAL_INT_UPGRADE(pos->y, y);
-               TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_BUTTON_W, w);
-               TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_BUTTON_H, h);
+               TEST_ASSERT_EQUAL_INT(pos->x, x);
+               TEST_ASSERT_EQUAL_INT(pos->y, y);
+               TEST_ASSERT_EQUAL_INT(MOMENTS_BUTTON_W, w);
+               TEST_ASSERT_EQUAL_INT(MOMENTS_BUTTON_H, h);
        }
 
        TEST_CASE_DONE(s_info.group);
index 0f2a96fb400e1f0ee98756eb11029e102558b08f..62fc94837859e8716eabeecc69f22a936a8d2d73 100755 (executable)
@@ -93,7 +93,7 @@ unit_case_func_t __case_check_bt(void * data)
 unit_case_func_t __continue_check_state(void * data)
 {
        Eina_List *button_list = __t__get_moments_control_button_list();
-       TEST_ASSERT_TRUE_UPGRADE(button_list != NULL);
+       TEST_ASSERT_TRUE(button_list != NULL);
 
        control_info_t *button = NULL;
 
@@ -108,18 +108,18 @@ unit_case_func_t __continue_check_state(void * data)
        for (i = 0; i < total; i++) {
                button = eina_list_nth(button_list, i);
 
-               TEST_ASSERT_TRUE_UPGRADE(button != NULL);
-               TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(button->button_layout));
+               TEST_ASSERT_TRUE(button != NULL);
+               TEST_ASSERT_TRUE(evas_object_visible_get(button->button_layout));
 
-               TEST_ASSERT_EQUAL_INT_UPGRADE(expected_index[i], button->index);
+               TEST_ASSERT_EQUAL_INT(expected_index[i], button->index);
 
                pos = moments_control_get_button_position(total, i);
                evas_object_geometry_get(button->button_layout, &x, &y, &w, &h);
 
-               TEST_ASSERT_EQUAL_INT_UPGRADE(pos->x, x);
-               TEST_ASSERT_EQUAL_INT_UPGRADE(pos->y, y);
-               TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_BUTTON_W, w);
-               TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_BUTTON_H, h);
+               TEST_ASSERT_EQUAL_INT(pos->x, x);
+               TEST_ASSERT_EQUAL_INT(pos->y, y);
+               TEST_ASSERT_EQUAL_INT(MOMENTS_BUTTON_W, w);
+               TEST_ASSERT_EQUAL_INT(MOMENTS_BUTTON_H, h);
        }
 
        TEST_CASE_DONE(s_info.group);
index 2896d76d4897f80dd4bcce191e07c857407e90b2..54e15fc99f7a0044fb1d968b0bbe4762961184cb 100755 (executable)
@@ -36,6 +36,7 @@ static void __tear_down(void)
 {
        if (moments_get_visible()) {
                moments_hide();
+
                ecore_timer_add(0.6, s_info.group->tear_down_complete, s_info.group);
                return ;
        }
@@ -46,70 +47,70 @@ static void __tear_down(void)
 static unit_case_func_t __case_check_hide(void *data)
 {
        Evas_Object *background_layout =  __t__get_moments_view_layout();
-       TEST_ASSERT_TRUE_UPGRADE(background_layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(background_layout) == EINA_FALSE);
+       TEST_ASSERT_TRUE(background_layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(background_layout) == EINA_FALSE);
 
        int x = 0, y = 0, w = 0, h = 0;
        evas_object_geometry_get(background_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);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        Evas_Object *status_layout = __t__get_moments_status_layout();
-       TEST_ASSERT_TRUE_UPGRADE(status_layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_layout) == EINA_FALSE);
+       TEST_ASSERT_TRUE(status_layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(status_layout) == EINA_FALSE);
 
        evas_object_geometry_get(status_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(MOMENTS_INIT_H, h);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
 
        Evas_Object *status_grid = __t__get_moments_status_grid();
-       TEST_ASSERT_TRUE_UPGRADE(status_grid != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(elm_object_part_content_get(status_layout, STATUS_CONTENT) != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_grid) == EINA_TRUE);
+       TEST_ASSERT_TRUE(status_grid != NULL);
+       TEST_ASSERT_TRUE(elm_object_part_content_get(status_layout, STATUS_CONTENT) != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(status_grid) == EINA_TRUE);
 
        evas_object_geometry_get(status_grid, &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(MOMENTS_INIT_H, h);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
 
        Evas_Object *status_battery = __t__get_moments_status_battery();
-       TEST_ASSERT_TRUE_UPGRADE(status_battery != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_battery));
+       TEST_ASSERT_TRUE(status_battery != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(status_battery));
 
        evas_object_geometry_get(status_battery, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X + MOMENTS_STATUS_BATTERY_ICON_X, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y + MOMENTS_STATUS_BATTERY_ICON_Y, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_X + MOMENTS_STATUS_BATTERY_ICON_X, x);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + MOMENTS_STATUS_BATTERY_ICON_Y, y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_H, h);
 
        Evas_Object *center_layout = __t__get_moments_center_layout();
-       TEST_ASSERT_TRUE_UPGRADE(center_layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(center_layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(center_layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(center_layout) == EINA_TRUE);
 
        evas_object_geometry_get(center_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_X + MOMENTS_CENTER_X, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y + MOMENTS_CENTER_Y, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_H, h);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_X + MOMENTS_CENTER_X, x);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y + MOMENTS_CENTER_Y, y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_H, h);
 
        Evas_Object *control_layout = __t__get_moments_control_layout();
-       TEST_ASSERT_TRUE_UPGRADE(control_layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(control_layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(control_layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(control_layout) == EINA_TRUE);
 
        evas_object_geometry_get(control_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);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -126,73 +127,73 @@ static unit_case_func_t __case_check_half(void *data)
 
 static unit_case_func_t __continue_check_half(void *data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        Evas_Object *background_layout =  __t__get_moments_view_layout();
-       TEST_ASSERT_TRUE_UPGRADE(background_layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(background_layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(background_layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(background_layout) == EINA_TRUE);
 
        int x = 0, y = 0, w = 0, h = 0;
        evas_object_geometry_get(background_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(-WINDOW_H + MOMENTS_INIT_H, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(-WINDOW_H + MOMENTS_INIT_H, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        Evas_Object *status_layout = __t__get_moments_status_layout();
-       TEST_ASSERT_TRUE_UPGRADE(status_layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(status_layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(status_layout) == EINA_TRUE);
 
        evas_object_geometry_get(status_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_INIT_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(0, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
 
        Evas_Object *status_grid = __t__get_moments_status_grid();
-       TEST_ASSERT_TRUE_UPGRADE(status_grid != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(elm_object_part_content_get(status_layout, STATUS_CONTENT) != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_grid) == EINA_TRUE);
+       TEST_ASSERT_TRUE(status_grid != NULL);
+       TEST_ASSERT_TRUE(elm_object_part_content_get(status_layout, STATUS_CONTENT) != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(status_grid) == EINA_TRUE);
 
        evas_object_geometry_get(status_grid, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_INIT_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(0, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
 
        Evas_Object *status_battery = __t__get_moments_status_battery();
-       TEST_ASSERT_TRUE_UPGRADE(status_battery != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(status_battery) == EINA_TRUE);
+       TEST_ASSERT_TRUE(status_battery != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(status_battery) == EINA_TRUE);
 
        evas_object_geometry_get(status_battery, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_X, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_Y, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_X, x);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_Y, y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_H, h);
 
        Evas_Object *center_layout = __t__get_moments_center_layout();
-       TEST_ASSERT_TRUE_UPGRADE(center_layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(center_layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(center_layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(center_layout) == EINA_TRUE);
 
        evas_object_geometry_get(center_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_X, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE((-WINDOW_H + MOMENTS_INIT_H) + MOMENTS_CENTER_Y, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_H, h);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_X, x);
+       TEST_ASSERT_EQUAL_INT((-WINDOW_H + MOMENTS_INIT_H) + MOMENTS_CENTER_Y, y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_H, h);
 
        Evas_Object *control_layout = __t__get_moments_control_layout();
-       TEST_ASSERT_TRUE_UPGRADE(control_layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(control_layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(control_layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(control_layout) == EINA_TRUE);
 
        evas_object_geometry_get(control_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(-WINDOW_H + MOMENTS_INIT_H, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(-WINDOW_H + MOMENTS_INIT_H, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -211,48 +212,48 @@ static unit_case_func_t __case_check_full(void *data)
 
 static unit_case_func_t __continue_check_full(void *data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        Evas_Object *background_layout =  __t__get_moments_view_layout();
-       TEST_ASSERT_TRUE_UPGRADE(background_layout != NULL);
+       TEST_ASSERT_TRUE(background_layout != NULL);
 
        int x = 0, y = 0, w = 0, h = 0;
        evas_object_geometry_get(background_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(0, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        Evas_Object *status_layout = __t__get_moments_status_layout();
-       TEST_ASSERT_TRUE_UPGRADE(status_layout != NULL);
+       TEST_ASSERT_TRUE(status_layout != NULL);
 
        evas_object_geometry_get(status_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_INIT_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(0, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
 
        Evas_Object *center_layout = __t__get_moments_center_layout();
-       TEST_ASSERT_TRUE_UPGRADE(center_layout != NULL);
+       TEST_ASSERT_TRUE(center_layout != NULL);
 
        evas_object_geometry_get(center_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_X, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_Y, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_CENTER_H, h);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_X, x);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_Y, y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_CENTER_H, h);
 
        Evas_Object *control_layout = __t__get_moments_control_layout();
-       TEST_ASSERT_TRUE_UPGRADE(control_layout != NULL);
+       TEST_ASSERT_TRUE(control_layout != NULL);
 
        evas_object_geometry_get(control_layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(0, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        TEST_CASE_DONE(s_info.group);
 }
index daba8da4738353672f7a056067d14eb377ef7af3..eeaccd8628bccfc071b06496ebed89ad5b5d91a1 100755 (executable)
@@ -61,7 +61,7 @@ static unit_case_func_t __continue_touch_up_and_check_hide(void * data);
 static unit_case_func_t __continue_check_bar_state_hide(void * data);
 static unit_case_func_t __case_drag_down_short_upgrade(void * data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        static int dest_y = 70;
        TEST_CASE_CONTINUE(0.6, __continue_drag, &dest_y);
@@ -72,8 +72,8 @@ static unit_case_func_t __continue_drag(void * data)
        int dest_y = *(int *)data;
 
        Evas_Object * layout = __t__get_moments_view_layout();
-       TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(layout != NULL);
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__background_layout_mouse_move(START_X, dest_y);
 
@@ -85,10 +85,10 @@ static unit_case_func_t __continue_touch_up_and_check_hide(void * data)
        int dest_y = *(int *)data;
 
        main_s * info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_up(info->layout, START_X, dest_y);
 
@@ -98,16 +98,16 @@ static unit_case_func_t __continue_touch_up_and_check_hide(void * data)
 static unit_case_func_t __continue_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);
+       TEST_ASSERT_TRUE(layout != NULL);
+       TEST_ASSERT_TRUE(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);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -117,7 +117,7 @@ static unit_case_func_t __continue_move_down(void * data);
 static unit_case_func_t __continue_move_up(void * data);
 static unit_case_func_t __case_check_layout_movement(void * data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        current_step = 0;
        TEST_CASE_CONTINUE(0.6, __continue_move_down, NULL);
@@ -130,10 +130,10 @@ static unit_case_func_t __continue_move_down(void * data)
        }
 
        main_s * info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == true);
+       TEST_ASSERT_TRUE(moments_get_visible() == true);
 
        __t__layout_mouse_move(info->layout, START_X, START_Y + (current_step * DRAW_INC));
 
@@ -150,10 +150,10 @@ static unit_case_func_t __continue_move_up(void * data)
        current_step -= 1;
 
        main_s * info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == true);
+       TEST_ASSERT_TRUE(moments_get_visible() == true);
 
        __t__layout_mouse_move(info->layout, START_X, START_Y + (current_step * DRAW_INC));
 
@@ -166,14 +166,14 @@ static unit_case_func_t __continue_check_bar_state_full(void *data);
 static unit_case_func_t __case_drag_down_bottom(void * data)
 {
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_move(info->layout, START_X, WINDOW_H - DRAW_INC);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        TEST_CASE_CONTINUE(0.1, __continue_drag_up_short, NULL);
 }
@@ -181,12 +181,12 @@ static unit_case_func_t __case_drag_down_bottom(void * data)
 static unit_case_func_t __continue_drag_up_short(void *data)
 {
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
        int dest_y = WINDOW_H - DRAW_INC - (MOMENT_DRAW_LIMIT + 1);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_move(info->layout, START_X, dest_y);
 
@@ -198,10 +198,10 @@ static unit_case_func_t __continue_touch_up_and_check_full(void * data)
        int dest_y = *(int *)data;
 
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_up(info->layout, START_X, dest_y);
 
@@ -211,17 +211,17 @@ static unit_case_func_t __continue_touch_up_and_check_full(void * data)
 static unit_case_func_t __continue_check_bar_state_full(void *data)
 {
        Evas_Object *layout = __t__get_moments_view_layout();
-       TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
+       TEST_ASSERT_TRUE(layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
 
        int x = 0, y = 0, w = 0, h = 0;
        evas_object_geometry_get(layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(0, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -230,14 +230,14 @@ static unit_case_func_t __case_drag_down_check_hide_boundary(void * data)
 {
        int dest_y = DRAG_DOWN_BOUNDARY_Y -1;
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_move(info->layout, START_X, dest_y);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        TEST_CASE_CONTINUE(0.6, __continue_touch_up_and_check_hide, &dest_y);
 }
@@ -246,14 +246,14 @@ static unit_case_func_t __case_drag_down_check_full_boundary(void * data)
 {
        int dest_y = DRAG_DOWN_BOUNDARY_Y;
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_move(info->layout, START_X, dest_y);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        TEST_CASE_CONTINUE(0.6, __continue_touch_up_and_check_full, &dest_y);
 }
@@ -267,14 +267,14 @@ static unit_case_func_t __case_drag_up_check_hide_boundary(void * data)
 {
        static int move_inc = 10;
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_move(info->layout, START_X, WINDOW_H - DRAW_INC);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        TEST_CASE_CONTINUE(0.1, __continue_touch_up_bottom, &move_inc);
 }
@@ -282,10 +282,10 @@ static unit_case_func_t __case_drag_up_check_hide_boundary(void * data)
 static unit_case_func_t __continue_touch_up_bottom(void * data)
 {
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_up(info->layout, START_X, WINDOW_H - DRAW_INC);
 
@@ -295,24 +295,24 @@ static unit_case_func_t __continue_touch_up_bottom(void * data)
 static unit_case_func_t __continue_check_bar_state_full_and_drag_up(void *data)
 {
        Evas_Object *layout = __t__get_moments_view_layout();
-       TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
+       TEST_ASSERT_TRUE(layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
 
        int x = 0, y = 0, w = 0, h = 0;
        evas_object_geometry_get(layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT(0, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        TEST_CASE_CONTINUE(0.6, __continue_short_drag_start, data);
 }
 
 static unit_case_func_t __continue_short_drag_start(void *data)
 {
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__background_layout_mouse_down(START_X, MOMENTS_INIT_H);
        __t__background_layout_mouse_move(START_X, DRAG_UP_BOUNDARY_Y);
@@ -324,7 +324,7 @@ static unit_case_func_t __continue_short_drag(void *data)
 {
        int move_y = *(int *)data;
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__background_layout_mouse_move(START_X, DRAG_UP_BOUNDARY_Y - move_y);
 
@@ -334,7 +334,7 @@ static unit_case_func_t __continue_short_drag(void *data)
 static unit_case_func_t __continue_short_drag_end_and_check_state(void * data)
 {
        int move_y = *(int *)data;
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__background_layout_mouse_up(START_X, DRAG_UP_BOUNDARY_Y - move_y);
 
@@ -350,14 +350,14 @@ static unit_case_func_t __case_drag_up_check_full_boundary(void * data)
        static int move_inc = 9;
 
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_move(info->layout, START_X, WINDOW_H - DRAW_INC);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        TEST_CASE_CONTINUE(0.1, __continue_touch_up_bottom, &move_inc);
 }
index 9fe2bb1d33392f5d1d1e9c0961cde11288dc9d84..6b5a4db00a9f7009ce3629a0fdb70b4a43f4a804 100755 (executable)
@@ -45,13 +45,13 @@ static unit_case_func_t __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(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        __t__layout_mouse_down(info->layout, pos->x, pos->y);
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        TEST_CASE_CONTINUE(0.6, __continue_check_bar_state_half, NULL);
 }
@@ -59,16 +59,16 @@ static unit_case_func_t __case_touch_valid_area(void * data)
 static unit_case_func_t __continue_check_bar_state_half(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_TRUE);
+       TEST_ASSERT_TRUE(layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
 
        int x = 0, y = 0, w = 0, h = 0;
        evas_object_geometry_get(layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE((-WINDOW_H + MOMENTS_INIT_H), y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(WINDOW_H, h);
+       TEST_ASSERT_EQUAL_INT(0, x);
+       TEST_ASSERT_EQUAL_INT((-WINDOW_H + MOMENTS_INIT_H), y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -78,13 +78,13 @@ static unit_case_func_t __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(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        __t__layout_mouse_down(info->layout, pos->x, pos->y);
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -95,7 +95,7 @@ static unit_case_func_t __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_ASSERT_TRUE(moments_get_visible());
 
        TEST_CASE_CONTINUE(0.6, __continue_touch_up, NULL);
 }
@@ -103,14 +103,14 @@ static unit_case_func_t __case_touch_up_vaild_area(void * data)
 static unit_case_func_t __continue_touch_up(void * data)
 {
        main_s * info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(info->layout != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible());
 
        __t__layout_mouse_up(info->layout, 180, 50);
 
-       TEST_ASSERT_TRUE_UPGRADE(moments_get_visible() == false);
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
        TEST_CASE_CONTINUE(0.6, __continue_check_bar_state_hide, NULL);
 }
@@ -118,16 +118,16 @@ static unit_case_func_t __continue_touch_up(void * data)
 static unit_case_func_t __continue_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);
+       TEST_ASSERT_TRUE(layout != NULL);
+       TEST_ASSERT_TRUE(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);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_X, x);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, y);
+       TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
+       TEST_ASSERT_EQUAL_INT(WINDOW_H, h);
 
        TEST_CASE_DONE(s_info.group);
 }
index d720b77c922fa5790ecb9434610297a3997c4f70..f0cb2706361b96087a8eb16e9ad0f4e3862ac279 100755 (executable)
@@ -93,10 +93,10 @@ static unit_case_func_t __continue_check_status_flighton_serviceoff_wifioff(void
 static unit_case_func_t __case_check_status_flighton_serviceoff_wifioff(void *data)
 {
        main_s *info = main_get_info();
-       TEST_ASSERT_TRUE_UPGRADE(info != NULL);
+       TEST_ASSERT_TRUE(info != NULL);
 
        Evas_Object *layout = __t__get_moments_status_layout();
-       TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
+       TEST_ASSERT_TRUE(layout != NULL);
 
        Evas_Object *callsignal = __t__get_moments_status_callsignal();
        if (!callsignal) {
@@ -118,11 +118,11 @@ static unit_case_func_t __case_check_status_flighton_serviceoff_wifioff(void *da
        }
 
        __t__layout_mouse_down(info->layout, 180, 50);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(layout) == true);
+       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == true);
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(callsignal));
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(network));
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(location));
+       TEST_ASSERT_TRUE(evas_object_visible_get(callsignal));
+       TEST_ASSERT_TRUE(evas_object_visible_get(network));
+       TEST_ASSERT_TRUE(evas_object_visible_get(location));
 
        TEST_CASE_CONTINUE(0.6, __continue_check_status_flighton_serviceoff_wifioff, NULL);
 }
@@ -139,12 +139,12 @@ static unit_case_func_t __continue_check_status_flighton_serviceoff_wifioff(void
                TEST_CASE_CONTINUE(0.6, __continue_check_status_flighton_serviceoff_wifioff, NULL);
        }
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("flight_mode", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("hide", edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("hide", edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING("flight_mode", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING("hide", edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING("hide", edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
 
        Evas_Object *location = __t__get_moments_status_location();
-       TEST_ASSERT_TRUE_UPGRADE(!location);
+       TEST_ASSERT_TRUE(!location);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -160,7 +160,7 @@ static unit_case_func_t __case_check_status_flightoff_serviceoff_wifioff(void *d
                TEST_CASE_CONTINUE(0.2, __case_check_status_flightoff_serviceoff_wifioff, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(location != NULL);
+       TEST_ASSERT_TRUE(location != NULL);
 
        __t__moments_manager_update_status_view(0, 1, 0);
        TEST_CASE_CONTINUE(0.6, __continue_check_status_flightoff_serviceoff_wifioff, NULL);
@@ -172,12 +172,12 @@ static unit_case_func_t __continue_check_status_flightoff_serviceoff_wifioff(voi
        Evas_Object *callsignal = __t__get_moments_status_callsignal();
        Evas_Object *network = __t__get_moments_status_network();
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("hide", edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("hide", edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING("hide", edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING("hide", edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
 
        Evas_Object *location = __t__get_moments_status_location();
-       TEST_ASSERT_TRUE_UPGRADE(!location);
+       TEST_ASSERT_TRUE(!location);
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -202,9 +202,9 @@ static unit_case_func_t __continue_check_status_flightoff_serviceon_wifioff(void
         __t__moments_get_callsignal_state(&roaming, &strength);
         __t__moments_get_network_strength_and_packet_type(&network_type, &packet_type);
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__callsignal_array[strength][roaming], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[network_type], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[network_type == 0 ? network_type : packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__t__callsignal_array[strength][roaming], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__t__network_type[network_type], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__t__network_type[network_type == 0 ? network_type : packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -229,9 +229,9 @@ static unit_case_func_t __continue_check_status_flightoff_serviceon_wifion(void
         __t__moments_get_callsignal_state(&roaming, &strength);
         __t__moments_get_wifi_strength_and_packet_type(&network_type, &packet_type);
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__callsignal_array[strength][roaming], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[network_type+10], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__t__callsignal_array[strength][roaming], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__t__network_type[network_type+10], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__t__network_type[packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -263,11 +263,11 @@ static unit_case_func_t __continue_check_status_flightoff_serviceoff_wifion(void
         __t__moments_get_callsignal_state(&roaming, &strength);
         __t__moments_get_wifi_strength_and_packet_type(&network_type, &packet_type);
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[network_type+10], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__t__network_type[packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__t__network_type[network_type+10], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__t__network_type[packet_type+15], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
 
-       TEST_ASSERT_TRUE_UPGRADE(!evas_object_visible_get(location));
+       TEST_ASSERT_TRUE(!evas_object_visible_get(location));
 
        TEST_CASE_DONE(s_info.group);
 }
index 3f993b8770683891bbb32b14145b37c5a9373ada..68256e344f7693eece966ab994de21436b118024 100755 (executable)
@@ -133,15 +133,15 @@ static unit_case_func_t __continue_check_status_battery_icon_change(void *data);
 static unit_case_func_t __case_check_status_view_battery(void *data)
 {
        Evas_Object *battery = __t__get_moments_status_battery();
-       TEST_ASSERT_TRUE_UPGRADE(battery != NULL);
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(battery));
+       TEST_ASSERT_TRUE(battery != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(battery));
 
        int x, y, w, h;
        evas_object_geometry_get(battery, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_X, x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_Y, y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_BATTERY_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_X, x);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_Y, y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_BATTERY_ICON_H, h);
 
        static int percent = 0;
        __set_battery_percent(percent);
@@ -155,17 +155,17 @@ static unit_case_func_t __continue_check_status_battery_icon_change(void *data)
        int percent = *(int *)data;
 
        Evas_Object *layout = __t__get_moments_status_layout();
-       TEST_ASSERT_TRUE_UPGRADE(layout != NULL);
+       TEST_ASSERT_TRUE(layout != NULL);
 
        Evas_Object *battery = __t__get_moments_status_battery();
-       TEST_ASSERT_TRUE_UPGRADE(battery != NULL);
+       TEST_ASSERT_TRUE(battery != NULL);
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(battery_text, elm_object_part_text_get(layout, "txt.battery"));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(battery_percent, edje_object_part_state_get(elm_layout_edje_get(battery), "icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(battery_text, elm_object_part_text_get(layout, "txt.battery"));
+       TEST_ASSERT_EQUAL_STRING(battery_percent, edje_object_part_state_get(elm_layout_edje_get(battery), "icon_image", &val));
        if (percent % 2) {
-               TEST_ASSERT_EQUAL_STRING_UPGRADE("show", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val));
+               TEST_ASSERT_EQUAL_STRING("show", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val));
        } else {
-               TEST_ASSERT_EQUAL_STRING_UPGRADE("default", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val));
+               TEST_ASSERT_EQUAL_STRING("default", edje_object_part_state_get(elm_layout_edje_get(battery), "battery_charge_image", &val));
        }
        
        if (percent >= 100) {
@@ -194,17 +194,17 @@ static unit_case_func_t __case_check_status_view_callsignal(void *data)
                TEST_CASE_CONTINUE(0.1, __case_check_status_view_callsignal, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(callsignal));
+       TEST_ASSERT_TRUE(evas_object_visible_get(callsignal));
 
        int index = __t__get_moments_status_icon_index(STATUS_ICON_CALLSIGNAL);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_CALLSIGNAL, index);
+       TEST_ASSERT_EQUAL_INT(STATUS_ICON_CALLSIGNAL, index);
 
        int x, y, w, h;
        evas_object_geometry_get(callsignal, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
 
        moments_status_callsignal_update(call_strength, is_roaming);
 
@@ -216,9 +216,9 @@ static unit_case_func_t __continue_check_status_callsignal_icon_change(void *dat
        int strength = *(int *)data;
        double val = 0.0;
        Evas_Object *callsignal = __t__get_moments_status_callsignal();
-       TEST_ASSERT_TRUE_UPGRADE(callsignal != NULL);
+       TEST_ASSERT_TRUE(callsignal != NULL);
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__callsignal_type[call_signal_index], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__callsignal_type[call_signal_index], edje_object_part_state_get(elm_layout_edje_get(callsignal), "icon_image", &val));
 
        if (strength == 5 && !is_roaming) {
                TEST_CASE_DONE(s_info.group);
@@ -261,17 +261,17 @@ static unit_case_func_t __case_check_status_view_network(void *data)
                TEST_CASE_CONTINUE(0.1, __case_check_status_view_network, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(network));
+       TEST_ASSERT_TRUE(evas_object_visible_get(network));
 
        int index = __t__get_moments_status_icon_index(STATUS_ICON_NETWORK);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_NETWORK, index);
+       TEST_ASSERT_EQUAL_INT(STATUS_ICON_NETWORK, index);
 
        int x, y, w, h;
        evas_object_geometry_get(network, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
 
        moments_status_network_update(network_state.network_type, network_state.packet_type);
        network_state.packet_type += 1;
@@ -285,10 +285,10 @@ static unit_case_func_t __continue_check_status_network_icon_change(void *data)
        network_state_t *network_state = (network_state_t *)data;
 
        Evas_Object *network = __t__get_moments_status_network();
-       TEST_ASSERT_TRUE_UPGRADE(network != NULL);
+       TEST_ASSERT_TRUE(network != NULL);
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__network_type[network_state->network_type], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(__network_type[network_state->packet_type], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__network_type[network_state->network_type], edje_object_part_state_get(elm_layout_edje_get(network), "type_icon_image", &val));
+       TEST_ASSERT_EQUAL_STRING(__network_type[network_state->packet_type], edje_object_part_state_get(elm_layout_edje_get(network), "inout_icon_image", &val));
 
        if (network_state->network_type == 14 && network_state->packet_type == 18) {
                TEST_CASE_DONE(s_info.group);
@@ -321,17 +321,17 @@ static unit_case_func_t __case_check_status_view_bluetooth(void *data)
                TEST_CASE_CONTINUE(0.3, __case_check_status_view_bluetooth, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(bluetooth));
+       TEST_ASSERT_TRUE(evas_object_visible_get(bluetooth));
 
        int index = __t__get_moments_status_icon_index(STATUS_ICON_BLUETOOTH);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_BLUETOOTH, index);
+       TEST_ASSERT_EQUAL_INT(STATUS_ICON_BLUETOOTH, index);
 
        int x, y, w, h;
        evas_object_geometry_get(bluetooth, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
 
        moments_status_update_view();
        moments_status_bluetooth_update(bt_on_off, bt_connected);
@@ -345,7 +345,7 @@ static unit_case_func_t __continue_check_status_bluetooth_icon_change(void *data
        Evas_Object *bluetooth = (Evas_Object *)data;
 
        if (bt_connected < 2) {
-               TEST_ASSERT_EQUAL_STRING_UPGRADE(__bluetooth_state[bt_connected], edje_object_part_state_get(elm_layout_edje_get(bluetooth), "icon_image", &val));
+               TEST_ASSERT_EQUAL_STRING(__bluetooth_state[bt_connected], edje_object_part_state_get(elm_layout_edje_get(bluetooth), "icon_image", &val));
 
                if (bt_connected == 1) { // This time we should show off state
                        bt_on_off = 0;
@@ -364,7 +364,7 @@ static unit_case_func_t __continue_check_status_bluetooth_icon_change(void *data
        }
 
        bluetooth = __t__get_moments_status_bluetooth();
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(bluetooth));
+       TEST_ASSERT_TRUE(evas_object_visible_get(bluetooth));
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -379,17 +379,17 @@ static unit_case_func_t __case_check_status_view_headset(void *data)
                TEST_CASE_CONTINUE(0.3, __case_check_status_view_headset, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(headset));
+       TEST_ASSERT_TRUE(evas_object_visible_get(headset));
 
        int index = __t__get_moments_status_icon_index(STATUS_ICON_HEADSET);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_HEADSET, index);
+       TEST_ASSERT_EQUAL_INT(STATUS_ICON_HEADSET, index);
 
        int x, y, w, h;
        evas_object_geometry_get(headset, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
 
        moments_status_update_view();
 
@@ -403,7 +403,7 @@ static unit_case_func_t __continue_check_status_headset_icon_change(void *data)
        if (data != NULL) {
                Evas_Object *headset = (Evas_Object *)data;
 
-               TEST_ASSERT_TRUE_UPGRADE(!evas_object_visible_get(headset));
+               TEST_ASSERT_TRUE(!evas_object_visible_get(headset));
 
                moments_status_headset_icon_show();
                moments_status_update_view();
@@ -412,7 +412,7 @@ static unit_case_func_t __continue_check_status_headset_icon_change(void *data)
        } else {
                Evas_Object *headset = __t__get_moments_status_headset();
 
-               TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(headset));
+               TEST_ASSERT_TRUE(evas_object_visible_get(headset));
 
                TEST_CASE_DONE(s_info.group);
        }
@@ -430,17 +430,17 @@ static unit_case_func_t __case_check_status_view_simcard(void *data)
                TEST_CASE_CONTINUE(0.6, __case_check_status_view_simcard, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(simcard));
+       TEST_ASSERT_TRUE(evas_object_visible_get(simcard));
 
        int index = __t__get_moments_status_icon_index(STATUS_ICON_NO_SIM);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_NO_SIM, index);
+       TEST_ASSERT_EQUAL_INT(STATUS_ICON_NO_SIM, index);
 
        int x, y, w, h;
        evas_object_geometry_get(simcard, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
 
        moments_status_simcard_icon_hide();
        moments_status_update_view();
@@ -452,7 +452,7 @@ static unit_case_func_t __continue_check_status_simcard_icon_change(void *data)
 {
        if (data != NULL) {
                Evas_Object *simcard = (Evas_Object *)data;
-               TEST_ASSERT_TRUE_UPGRADE(!evas_object_visible_get(simcard));
+               TEST_ASSERT_TRUE(!evas_object_visible_get(simcard));
 
                moments_status_simcard_icon_show();
                moments_status_update_view();
@@ -460,8 +460,8 @@ static unit_case_func_t __continue_check_status_simcard_icon_change(void *data)
                TEST_CASE_CONTINUE(0.6, __continue_check_status_simcard_icon_change, NULL);
        } else {
                Evas_Object *simcard = __t__get_moments_status_simcard();
-               TEST_ASSERT_TRUE_UPGRADE(simcard != NULL);
-               TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(simcard));
+               TEST_ASSERT_TRUE(simcard != NULL);
+               TEST_ASSERT_TRUE(evas_object_visible_get(simcard));
        }
 
        TEST_CASE_DONE(s_info.group);
@@ -476,17 +476,17 @@ static unit_case_func_t __case_check_status_view_callforwarding(void *data)
                TEST_CASE_CONTINUE(0.3, __case_check_status_view_callforwarding, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(callforwarding));
+       TEST_ASSERT_TRUE(evas_object_visible_get(callforwarding));
 
        int index = __t__get_moments_status_icon_index(STATUS_ICON_CALLFORWARDING);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(STATUS_ICON_CALLFORWARDING, index);
+       TEST_ASSERT_EQUAL_INT(STATUS_ICON_CALLFORWARDING, index);
 
        int x, y, w, h;
        evas_object_geometry_get(callforwarding, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
 
        moments_status_update_view();
 
@@ -505,17 +505,17 @@ static unit_case_func_t __case_check_status_view_location(void *data)
                TEST_CASE_CONTINUE(0.6, __case_check_status_view_location, NULL);
        }
 
-       TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(location));
+       TEST_ASSERT_TRUE(evas_object_visible_get(location));
 
        int index = __t__get_moments_status_icon_index(STATUS_ICON_LOCATION);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(index, STATUS_ICON_LOCATION);
+       TEST_ASSERT_EQUAL_INT(index, STATUS_ICON_LOCATION);
 
        int x, y, w, h;
        evas_object_geometry_get(location, &x, &y, &w, &h);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][0], x);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(__t_status_icon_position[s_info.is_3g][index][1], y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_W, w);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(MOMENTS_STATUS_ICON_H, h);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][0], x);
+       TEST_ASSERT_EQUAL_INT(__t_status_icon_position[s_info.is_3g][index][1], y);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_W, w);
+       TEST_ASSERT_EQUAL_INT(MOMENTS_STATUS_ICON_H, h);
 
        moments_status_location_icon_hide();
        moments_status_update_view();
@@ -528,7 +528,7 @@ static unit_case_func_t __continue_check_status_location_icon_change(void *data)
 {
        if (data != NULL) {
                Evas_Object *location = (Evas_Object *)data;
-               TEST_ASSERT_TRUE_UPGRADE(!evas_object_visible_get(location));
+               TEST_ASSERT_TRUE(!evas_object_visible_get(location));
 
                moments_status_location_icon_show();
                moments_status_update_view();
@@ -536,8 +536,8 @@ static unit_case_func_t __continue_check_status_location_icon_change(void *data)
                TEST_CASE_CONTINUE(0.6, __continue_check_status_location_icon_change, NULL);
        } else {
                Evas_Object *location = __t__get_moments_status_location();
-               TEST_ASSERT_TRUE_UPGRADE(location != NULL);
-               TEST_ASSERT_TRUE_UPGRADE(evas_object_visible_get(location));
+               TEST_ASSERT_TRUE(location != NULL);
+               TEST_ASSERT_TRUE(evas_object_visible_get(location));
        }
 
        TEST_CASE_DONE(s_info.group);
index 049e4cba29a8c0431df12fea31b5e4050f147c18..71a535b3ff27143deac492029c7a4aec7a7e04f8 100755 (executable)
 #include <Elementary.h>
 #include <app.h>
 
-static void __case_touch_down_top(bool * is_passed);
-static void __case_drag_down(bool * is_passed);
-static void __case_drag_up(bool * is_passed);
-static void __case_touch_up(bool * is_passed);
-static void __case_touch_down_bottom(bool *is_passed);
-static void __case_check_content_alpha(bool * is_passed);
-
 static struct {
-       Ecore_Timer * group_timer;
        unit_group_t * group;
-       int current_case;
-       int current_step;
-       int last_mouse_x;
-       int last_mouse_y;
-       int mouse_down_y;
-       void(*case_pool[TEST_CASE_MAX + 1])(bool * is_passed);
+       int move_y[20];
 } s_info = {
-       .group_timer = NULL,
        .group = NULL,
-       .current_case = 0,
-       .current_step = 0,
-       .last_mouse_x = 0,
-       .last_mouse_y = 0,
-       .mouse_down_y = 0,
-       .case_pool = {
-                                       __case_touch_down_top,
-                                       __case_drag_down,               /*[[----------*/
-                                       __case_check_content_alpha, /* ------]] x 11 */
-                                       __case_touch_up,
-                                       __case_touch_down_bottom,
-                                       __case_drag_up,
-                                       __case_touch_up,
-                                       NULL,
-                               },
+       .move_y = { 0, },
 };
 
-static Eina_Bool __group_timer_callback(void * data);
-
-static int move_y[10] = { 0, };
-static void __set_up(void)
+static void __group_set_up(void)
 {
-       move_y[0] = MOMENT_BUTTON_VI_START_Y;
-       move_y[1] = MOMENT_BUTTON_VI_START_Y + 1;
-       move_y[2] = MOMENT_BUTTON_VI_START_Y;
-       move_y[3] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 4;
-       move_y[4] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2;
-       move_y[5] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) * 3 / 4;
-       move_y[6] = MOMENT_BUTTON_VI_END_Y - 1;
-       move_y[7] = MOMENT_BUTTON_VI_END_Y;
-       move_y[8] = MOMENT_BUTTON_VI_END_Y + 1;
-       move_y[9] = -1;
+       s_info.move_y[0] = MOMENT_BUTTON_VI_START_Y;
+       s_info.move_y[1] = MOMENT_BUTTON_VI_START_Y + 1;
+       s_info.move_y[2] = MOMENT_BUTTON_VI_START_Y;
+       s_info.move_y[3] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 4;
+       s_info.move_y[4] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2;
+       s_info.move_y[5] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) * 3 / 4;
+       s_info.move_y[6] = MOMENT_BUTTON_VI_END_Y - 1;
+       s_info.move_y[7] = MOMENT_BUTTON_VI_END_Y;
+       s_info.move_y[8] = MOMENT_BUTTON_VI_END_Y + 1;
+       s_info.move_y[9] = -1;
+
+       s_info.move_y[18] = MOMENT_BUTTON_VI_START_Y;
+       s_info.move_y[17] = MOMENT_BUTTON_VI_START_Y + 1;
+       s_info.move_y[16] = MOMENT_BUTTON_VI_START_Y;
+       s_info.move_y[15] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 4;
+       s_info.move_y[14] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2;
+       s_info.move_y[13] = (MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) * 3 / 4;
+       s_info.move_y[12] = MOMENT_BUTTON_VI_END_Y - 1;
+       s_info.move_y[11] = MOMENT_BUTTON_VI_END_Y;
+       s_info.move_y[10] = MOMENT_BUTTON_VI_END_Y + 1;
+       s_info.move_y[19] = -1;
+
+       TEST_GROUP_SET_UP_DONE(0.0, s_info.group);
 }
 
-static void __tear_down(void) {}
-
-static void __case_touch_down_top(bool * is_passed)
-{
-       main_s * info = main_get_info();
-       TEST_ASSERT_TRUE(info != NULL);
-       TEST_ASSERT_TRUE(info->layout != NULL);
-
-       TEST_ASSERT_TRUE(moments_get_visible() == false);
-
-       __t__layout_mouse_down(info->layout, WINDOW_W / 2, MOMENTS_INIT_H / 2);
-       s_info.mouse_down_y = MOMENTS_INIT_H / 2;
-
-       TEST_ASSERT_TRUE(moments_get_visible());
-
-       Evas_Object * layout = __t__get_moments_status_layout();
-
-       TEST_ASSERT_TRUE(layout != NULL);
-       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
-
-       *is_passed = true;
-}
-
-
-static void __case_drag_down(bool * is_passed)
+static void __set_up(void)
 {
-       main_s * info = main_get_info();
-       TEST_ASSERT_TRUE(info != NULL);
-       TEST_ASSERT_TRUE(info->layout != NULL);
-
-       TEST_ASSERT_TRUE(moments_get_visible() == true);
-
-       __t__layout_mouse_move(info->layout, WINDOW_W / 2, move_y[s_info.current_step]);
+       if (moments_get_visible()) {
+               moments_hide();
 
-       s_info.last_mouse_x = WINDOW_W / 2;
-       s_info.last_mouse_y = move_y[s_info.current_step];
-
-       s_info.current_step += 1;
+               ecore_timer_add(0.6, s_info.group->set_up_complete, s_info.group);
+               return ;
+       }
 
-       *is_passed = true;
+       s_info.group->set_up_complete(s_info.group);
 }
 
-static void __case_drag_up(bool * is_passed)
+static void __tear_down(void)
 {
-       s_info.current_step -= 1;
-
-       main_s * info = main_get_info();
-       TEST_ASSERT_TRUE(info != NULL);
-       TEST_ASSERT_TRUE(info->layout != NULL);
+       if (moments_get_visible()) {
+               moments_hide();
 
-       TEST_ASSERT_TRUE(moments_get_visible() == true);
-
-       __t__layout_mouse_move(info->layout, WINDOW_W / 2, s_info.last_mouse_y - (s_info.current_step * DRAW_INC));
-
-       s_info.last_mouse_x = WINDOW_W / 2;
-       s_info.last_mouse_y = s_info.last_mouse_y - (s_info.current_step * DRAW_INC);
-
-       *is_passed = true;
-
-       if (s_info.current_step > 0 && s_info.current_step < 10) {
-               s_info.current_case -= 1;
+               ecore_timer_add(0.6, s_info.group->tear_down_complete, s_info.group);
+               return ;
        }
 
+       s_info.group->tear_down_complete(s_info.group);
 }
 
-static void __case_touch_down_bottom(bool *is_passed)
+static unit_case_func_t __continue_check_content_alpha(void *data);
+static unit_case_func_t __case_drag_down(void *data)
 {
-       Evas_Object * layout = __t__get_moments_view_layout();
-       TEST_ASSERT_TRUE(layout != NULL);
-       TEST_ASSERT_TRUE(moments_get_visible());
-
-       __t__background_layout_mouse_down(WINDOW_W / 2, WINDOW_H - DRAW_INC);
-       __t__background_layout_mouse_move(WINDOW_W / 2, WINDOW_H - DRAW_INC - (MOMENT_DRAW_LIMIT + 1));
-
-       s_info.mouse_down_y = WINDOW_H - DRAW_INC;
-       s_info.last_mouse_x = WINDOW_W / 2;
-       s_info.last_mouse_y = WINDOW_H - DRAW_INC - (MOMENT_DRAW_LIMIT + 1);
-
-       TEST_ASSERT_TRUE(moments_get_visible());
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
-       *is_passed = true;
-}
+       Evas_Object * layout = __t__get_moments_status_layout();
+       TEST_ASSERT_TRUE(layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == false);
 
-static void __case_touch_up(bool * is_passed)
-{
        main_s * info = main_get_info();
        TEST_ASSERT_TRUE(info != NULL);
        TEST_ASSERT_TRUE(info->layout != NULL);
 
+       __t__layout_mouse_down(info->layout, WINDOW_W / 2, MOMENTS_INIT_H / 2);
        TEST_ASSERT_TRUE(moments_get_visible());
 
-       __t__layout_mouse_up(info->layout, s_info.last_mouse_x, s_info.last_mouse_y);
-
-       *is_passed = true;
+       TEST_CASE_CONTINUE(0.6, __continue_check_content_alpha, (void*)0);
 }
 
-static void __case_check_content_alpha(bool * is_passed)
+static unit_case_func_t __continue_check_content_alpha(void *data)
 {
        Evas_Object * control_layout = __t__get_moments_control_layout();
        TEST_ASSERT_TRUE(control_layout != NULL);
@@ -184,40 +113,76 @@ static void __case_check_content_alpha(bool * is_passed)
        evas_object_color_get(center_layout, &r, &g, &b, &a);
        TEST_ASSERT_EQUAL_INT(__t__get_center_layout_alpha(y + WINDOW_H), a);
 
+       main_s * info = main_get_info();
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
+
+       TEST_ASSERT_TRUE(moments_get_visible() == true);
 
-       if (move_y[s_info.current_step] != -1) {
-               s_info.current_case -= 2;
+       if (s_info.move_y[(int)data] == -1) {
+               if ((int)data < 10)
+                       __t__layout_mouse_up(info->layout, WINDOW_W / 2, s_info.move_y[(int)data - 1]);
+               else
+                       __t__background_layout_mouse_up(WINDOW_W / 2, s_info.move_y[(int)data - 1]);
+
+               TEST_CASE_DONE(s_info.group);
        }
 
-       *is_passed = true;
+       if ((int)data < 10)
+               __t__layout_mouse_move(info->layout, WINDOW_W / 2, s_info.move_y[(int)data]);
+       else
+               __t__background_layout_mouse_move(WINDOW_W / 2, s_info.move_y[(int)data]);
+
+       TEST_CASE_CONTINUE(0.1, __continue_check_content_alpha, (void*)((int)data + 1));
 }
 
-void group_feature_moments_vi(unit_group_t * group)
+static unit_case_func_t __continue_touch_down_bottom(void *data);
+static unit_case_func_t __case_drag_up(void *data)
 {
-       if (s_info.group_timer) {
-               ecore_timer_del(s_info.group_timer);
-               s_info.group_timer = NULL;
-       }
+       TEST_ASSERT_TRUE(moments_get_visible() == false);
 
-       s_info.current_step = 0;
-       s_info.current_case = 0;
-       s_info.group = group;
-       s_info.group_timer = ecore_timer_add(0.05, __group_timer_callback, NULL);
+       Evas_Object * layout = __t__get_moments_status_layout();
+       TEST_ASSERT_TRUE(layout != NULL);
+       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == false);
+
+       main_s * info = main_get_info();
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
+
+       __t__layout_mouse_down(info->layout, 180, 50);
+       __t__layout_mouse_move(info->layout, 180, 300);
+       __t__layout_mouse_up(info->layout, 180, 300);
+       TEST_ASSERT_TRUE(moments_get_visible());
+
+       TEST_CASE_CONTINUE(0.6, __continue_touch_down_bottom, NULL);
 }
 
-static Eina_Bool __group_timer_callback(void * data)
+static unit_case_func_t __continue_touch_down_bottom(void *data)
 {
-       if (s_info.case_pool[s_info.current_case] == NULL) {
-               s_info.group->finish(s_info.group);
+       Evas_Object * layout = __t__get_moments_view_layout();
+       TEST_ASSERT_TRUE(layout != NULL);
+       TEST_ASSERT_TRUE(moments_get_visible());
 
-               s_info.group_timer = NULL;
-               return ECORE_CALLBACK_CANCEL;
-       }
+       __t__background_layout_mouse_down(WINDOW_W / 2, WINDOW_H - DRAW_INC);
+       __t__background_layout_mouse_move(WINDOW_W / 2, WINDOW_H - DRAW_INC - (MOMENT_DRAW_LIMIT + 1));
+
+       TEST_ASSERT_TRUE(moments_get_visible());
+
+       TEST_CASE_CONTINUE(0.1, __continue_check_content_alpha, (void*)10);
+}
+
+void group_feature_moments_vi(unit_group_t * group)
+{
+       s_info.group = group;
+       s_info.group->set_up = __set_up;
+       s_info.group->tear_down = __tear_down;
+
+       TEST_GROUP_SET_UP(s_info.group, __group_set_up);
 
-       TEST_CASE(s_info.group, s_info.case_pool[s_info.current_case]);
-       s_info.current_case += 1;
+       TEST_CASE_ADD(s_info.group, __case_drag_down, NULL);
+       TEST_CASE_ADD(s_info.group, __case_drag_up, NULL);
 
-       return ECORE_CALLBACK_RENEW;
+       TEST_GROUP_RUN(s_info.group);
 }
 
 #endif
index 100aebfabe4f9164c23b5531f347479ef786c3f6..ad549f8f7d1df9e668eee5e23eb472f1463dd2d0 100755 (executable)
 #include <Elementary.h>
 #include <app.h>
 
-
-static void __case_touch_down_top(bool * is_passed);
-static void __case_touch_up(bool * is_passed);
-static void __case_check_status_layout_state_show(bool * is_passed);
-static void __case_check_icon_state_show(bool * is_passed);
-
 static struct {
-       int current_step;
-       Ecore_Timer * group_timer;
        unit_group_t * group;
-       int current_case;
-       void(*case_pool[TEST_CASE_MAX + 1])(bool * is_passed);
 } s_info = {
-       .current_step = 0,
-       .group_timer = NULL,
        .group = NULL,
-       .current_case = 0,
-       .case_pool = {
-                                       __case_touch_down_top,
-                                       __case_check_status_layout_state_show,
-                                       __case_check_icon_state_show,
-                                       __case_touch_up,
-                                       NULL,
-                               },
 };
 
-static Eina_Bool __group_timer_callback(void * data);
-
-static void __set_up(void) {}
-
-static void __tear_down(void) {}
-
-const int touch_x[10] = { 180, 101, 259, 180, 180, 0 };
-const int touch_y[10] = { 50, 50, 50, 89, 0, 0 };
-
-
-static void __case_touch_down_top(bool * is_passed)
+static void __group_set_up(void)
 {
-       main_s * info = main_get_info();
-       TEST_ASSERT_TRUE(info != NULL);
-       TEST_ASSERT_TRUE(info->layout != NULL);
-
-       TEST_ASSERT_TRUE(moments_get_visible() == false);
+       if (moments_get_visible()) {
+               moments_hide();
 
-       __t__layout_mouse_down(info->layout, touch_x[s_info.current_step], touch_y[s_info.current_step]);
-
-       TEST_ASSERT_TRUE(moments_get_visible());
-
-       Evas_Object * layout = __t__get_moments_status_layout();
-
-       TEST_ASSERT_TRUE(layout != NULL);
-       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
+               TEST_GROUP_SET_UP_DONE(0.6, s_info.group);
+       }
 
-       *is_passed = true;
+       TEST_GROUP_SET_UP_DONE(0.0, s_info.group);
 }
 
-static void __case_touch_up(bool * is_passed)
+static void __group_tear_down(void)
 {
-       main_s * info = main_get_info();
-       TEST_ASSERT_TRUE(info != NULL);
-       TEST_ASSERT_TRUE(info->layout != NULL);
+       if (moments_get_visible()) {
+               moments_hide();
 
-       TEST_ASSERT_TRUE(moments_get_visible());
-
-       __t__layout_mouse_up(info->layout, touch_x[s_info.current_step], touch_y[s_info.current_step]);
+               TEST_GROUP_TEAR_DOWN_DONE(0.6, s_info.group);
+       }
 
-       TEST_ASSERT_TRUE(moments_get_visible() == false);
+       TEST_GROUP_TEAR_DOWN_DONE(0.0, s_info.group);
+}
 
-       s_info.current_step += 1;
+static void __set_up(void)
+{
+       s_info.group->set_up_complete(s_info.group);
+}
 
-       *is_passed = true;
+static void __tear_down(void)
+{
+       s_info.group->tear_down_complete(s_info.group);
 }
 
-static void __case_check_status_layout_state_show(bool * is_passed)
+static unit_case_func_t __case_check_status_layout(void * data)
 {
+       int state = (int)data;
+       int is_show = (state % 2);
+       int expected_x = is_show ? 0 : OUTSIDE_X;
+       int expected_y = is_show ? 0 : OUTSIDE_Y;
+
+       TEST_ASSERT_TRUE(moments_get_visible() == is_show);
+
        Evas_Object * layout = __t__get_moments_status_layout();
        TEST_ASSERT_TRUE(layout != NULL);
-       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
+       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == is_show);
 
        int x = 0, y = 0, w = 0, h = 0;
        evas_object_geometry_get(layout, &x, &y, &w, &h);
 
-       TEST_ASSERT_EQUAL_INT(0, x);
-       TEST_ASSERT_EQUAL_INT(0, y);
+       TEST_ASSERT_EQUAL_INT(expected_x, x);
+       TEST_ASSERT_EQUAL_INT(expected_y, y);
        TEST_ASSERT_EQUAL_INT(WINDOW_W, w);
        TEST_ASSERT_EQUAL_INT(MOMENTS_INIT_H, h);
 
-       *is_passed = true;
-}
-
-static void __case_check_icon_state_show(bool * is_passed)
-{
-       Evas_Object * layout = __t__get_moments_status_layout();
+       main_s * info = main_get_info();
+       TEST_ASSERT_TRUE(info != NULL);
+       TEST_ASSERT_TRUE(info->layout != NULL);
 
-       TEST_ASSERT_TRUE(layout != NULL);
-       TEST_ASSERT_TRUE(evas_object_visible_get(layout) == EINA_TRUE);
+       if (state == 0) {
+               __t__layout_mouse_down(info->layout, 180, 50);
+               TEST_ASSERT_TRUE(moments_get_visible());
+               TEST_CASE_CONTINUE(0.6, __case_check_status_layout, (void*)1);
+       } else if (state == 1) {
+               __t__layout_mouse_up(info->layout, 180, 50);
+               TEST_ASSERT_TRUE(moments_get_visible() == false);
+               TEST_CASE_CONTINUE(0.6, __case_check_status_layout, (void*)2);
+       }
 
-       *is_passed = true;
+       TEST_CASE_DONE(s_info.group);
 }
 
 void group_feature_status_area_layer_show(unit_group_t * group)
 {
-       if (s_info.group_timer) {
-               ecore_timer_del(s_info.group_timer);
-               s_info.group_timer = NULL;
-       }
-
-       s_info.current_step = 0;
-       s_info.current_case = 0;
        s_info.group = group;
-       s_info.group_timer = ecore_timer_add(0.6, __group_timer_callback, NULL);
-}
+       s_info.group->set_up = __set_up;
+       s_info.group->tear_down = __tear_down;
 
-static Eina_Bool __group_timer_callback(void * data)
-{
-       if (s_info.case_pool[s_info.current_case] == NULL) {
-               s_info.group->finish(s_info.group);
-
-               s_info.group_timer = NULL;
-               return ECORE_CALLBACK_CANCEL;
-       }
+       TEST_GROUP_SET_UP(s_info.group, __group_set_up);
+       TEST_GROUP_TEAR_DOWN(s_info.group, __group_tear_down);
 
-       TEST_CASE(s_info.group, s_info.case_pool[s_info.current_case]);
-       s_info.current_case += 1;
+       TEST_CASE_ADD(s_info.group, __case_check_status_layout, (void*)0);
 
-       return ECORE_CALLBACK_RENEW;
+       TEST_GROUP_RUN(s_info.group);
 }
 
 #endif
index 320dc9a7490076f7f69700529176ea75546773ac..08cb6b4f2d574d21747f578fd68900d8496fd132 100755 (executable)
@@ -31,31 +31,31 @@ static void __tear_down(void)
 static unit_case_func_t __case_check_battery_percent_round_off(void * data)
 {
        int real_percent = 2;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(0, __t__get_round_off_percent(real_percent));
        real_percent = 4;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(0, __t__get_round_off_percent(real_percent));
        real_percent = 6;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(5, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(5, __t__get_round_off_percent(real_percent));
        real_percent = 8;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(10, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(10, __t__get_round_off_percent(real_percent));
        real_percent = 21;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(20, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(20, __t__get_round_off_percent(real_percent));
        real_percent = 33;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(35, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(35, __t__get_round_off_percent(real_percent));
        real_percent = 49;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(50, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(50, __t__get_round_off_percent(real_percent));
        real_percent = 82;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(80, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(80, __t__get_round_off_percent(real_percent));
        real_percent = 88;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(90, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(90, __t__get_round_off_percent(real_percent));
        real_percent = 97;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(95, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(95, __t__get_round_off_percent(real_percent));
        real_percent = 100;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(100, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(100, __t__get_round_off_percent(real_percent));
        real_percent = 120;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(100, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(100, __t__get_round_off_percent(real_percent));
        real_percent = 200;
-       TEST_ASSERT_EQUAL_INT_UPGRADE(100, __t__get_round_off_percent(real_percent));
+       TEST_ASSERT_EQUAL_INT(100, __t__get_round_off_percent(real_percent));
 
        TEST_CASE_DONE(s_info.group);
 }
index 255471891df98e88895e1ebd74a0996081908081..cbf6142b694cbfb3030c9c468c8bda0b17a4e679 100755 (executable)
@@ -46,70 +46,70 @@ static unit_case_func_t __case_check_view_position(void * data)
 {
        int dest_y = 0;
        __t__get_draw_up_view_y(0, 0, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, dest_y);
+       TEST_ASSERT_EQUAL_INT(0, dest_y);
 
        dest_y = 0;
        __t__get_draw_up_view_y(180, 180, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, dest_y);
+       TEST_ASSERT_EQUAL_INT(0, dest_y);
 
        dest_y = 0;
        __t__get_draw_up_view_y(100, 90, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, dest_y);
+       TEST_ASSERT_EQUAL_INT(0, dest_y);
 
        dest_y = 0;
        __t__get_draw_up_view_y(100, 89, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(-1, dest_y);
+       TEST_ASSERT_EQUAL_INT(-1, dest_y);
 
        dest_y = 0;
        __t__get_draw_up_view_y(100, 10, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(-80, dest_y);
+       TEST_ASSERT_EQUAL_INT(-80, dest_y);
 
        dest_y = 0;
        __t__get_draw_up_view_y(100, 130, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, dest_y);
+       TEST_ASSERT_EQUAL_INT(0, dest_y);
 
        int start_y = -WINDOW_H + MOMENTS_INIT_H;
 
        dest_y = OUTSIDE_Y;
        __t__get_draw_down_view_y(100, 100, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
 
        dest_y = OUTSIDE_Y;
        __t__get_draw_down_view_y(100, 30, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
 
        dest_y = OUTSIDE_Y;
        __t__get_draw_down_view_y(200, 300, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
 
        dest_y = OUTSIDE_Y;
        __t__get_draw_down_view_y(100, 111, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
 
        dest_y = OUTSIDE_Y;
        __t__get_draw_down_view_y(100, MOMENTS_INIT_H, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(OUTSIDE_Y, dest_y);
+       TEST_ASSERT_EQUAL_INT(OUTSIDE_Y, dest_y);
 
        dest_y = OUTSIDE_Y;
        __t__get_draw_down_view_y(100, MOMENTS_INIT_H + 1, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(start_y + 1, dest_y);
+       TEST_ASSERT_EQUAL_INT(start_y + 1, dest_y);
 
        dest_y = OUTSIDE_Y;
        __t__get_draw_down_view_y(50, MOMENTS_INIT_H + 100, &dest_y);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(start_y + 100, dest_y);
+       TEST_ASSERT_EQUAL_INT(start_y + 100, dest_y);
 
        TEST_CASE_DONE(s_info.group);
 }
 
 static unit_case_func_t __case_control_layout_alpha(void * data)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, __t__get_control_layout_alpha(MOMENTS_INIT_H));
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, __t__get_control_layout_alpha((MOMENTS_INIT_H + MOMENT_BUTTON_VI_START_Y) / 2));
-       TEST_ASSERT_EQUAL_INT_UPGRADE(125, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y));
-       TEST_ASSERT_EQUAL_INT_UPGRADE(190, __t__get_control_layout_alpha((MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2.0));
-       TEST_ASSERT_EQUAL_INT_UPGRADE(156, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y + ((MOMENT_BUTTON_VI_END_Y - MOMENT_BUTTON_VI_START_Y) / 4.0)));
-       TEST_ASSERT_EQUAL_INT_UPGRADE(221, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y + ((MOMENT_BUTTON_VI_END_Y - MOMENT_BUTTON_VI_START_Y) * 3.0 / 4.0)));
-       TEST_ASSERT_EQUAL_INT_UPGRADE(255, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_END_Y));
+       TEST_ASSERT_EQUAL_INT(0, __t__get_control_layout_alpha(MOMENTS_INIT_H));
+       TEST_ASSERT_EQUAL_INT(0, __t__get_control_layout_alpha((MOMENTS_INIT_H + MOMENT_BUTTON_VI_START_Y) / 2));
+       TEST_ASSERT_EQUAL_INT(125, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y));
+       TEST_ASSERT_EQUAL_INT(190, __t__get_control_layout_alpha((MOMENT_BUTTON_VI_START_Y + MOMENT_BUTTON_VI_END_Y) / 2.0));
+       TEST_ASSERT_EQUAL_INT(156, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y + ((MOMENT_BUTTON_VI_END_Y - MOMENT_BUTTON_VI_START_Y) / 4.0)));
+       TEST_ASSERT_EQUAL_INT(221, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_START_Y + ((MOMENT_BUTTON_VI_END_Y - MOMENT_BUTTON_VI_START_Y) * 3.0 / 4.0)));
+       TEST_ASSERT_EQUAL_INT(255, __t__get_control_layout_alpha(MOMENT_BUTTON_VI_END_Y));
 
        TEST_CASE_DONE(s_info.group);
 }
@@ -121,38 +121,38 @@ static unit_case_func_t __case_control_button_create(void * data)
        Evas_Object * base_layout = win_create("TEST");
 
        control_info_t *button = moments_control_create_button(base_layout, button_id);
-       TEST_ASSERT_TRUE_UPGRADE(button != NULL);
+       TEST_ASSERT_TRUE(button != NULL);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(control_button_list[button_id].btn_type, button->btn_type);
+       TEST_ASSERT_EQUAL_INT(control_button_list[button_id].btn_type, button->btn_type);
 
-       TEST_ASSERT_TRUE_UPGRADE(control_button_list[button_id].label != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(control_button_list[button_id].label, button->label);
+       TEST_ASSERT_TRUE(control_button_list[button_id].label != NULL);
+       TEST_ASSERT_EQUAL_STRING(control_button_list[button_id].label, button->label);
 
-       TEST_ASSERT_TRUE_UPGRADE(control_button_list[button_id].icon_image != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(control_button_list[button_id].icon_image, button->icon_image);
+       TEST_ASSERT_TRUE(control_button_list[button_id].icon_image != NULL);
+       TEST_ASSERT_EQUAL_STRING(control_button_list[button_id].icon_image, button->icon_image);
 
-       TEST_ASSERT_TRUE_UPGRADE(control_button_list[button_id].volume_text != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(control_button_list[button_id].volume_text, button->volume_text);
+       TEST_ASSERT_TRUE(control_button_list[button_id].volume_text != NULL);
+       TEST_ASSERT_EQUAL_STRING(control_button_list[button_id].volume_text, button->volume_text);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(control_button_list[button_id].icon_status, button->icon_status);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(control_button_list[button_id].more_opt_status, button->more_opt_status);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(control_button_list[button_id].index, button->index);
+       TEST_ASSERT_EQUAL_INT(control_button_list[button_id].icon_status, button->icon_status);
+       TEST_ASSERT_EQUAL_INT(control_button_list[button_id].more_opt_status, button->more_opt_status);
+       TEST_ASSERT_EQUAL_INT(control_button_list[button_id].index, button->index);
 
-       TEST_ASSERT_TRUE_UPGRADE(control_button_list[button_id].pressed == button->pressed);
+       TEST_ASSERT_TRUE(control_button_list[button_id].pressed == button->pressed);
 
-       TEST_ASSERT_TRUE_UPGRADE(button->button_layout != NULL);
+       TEST_ASSERT_TRUE(button->button_layout != NULL);
 
        Evas_Object * icon = elm_object_part_content_get(button->button_layout, CONTROLS_ICON);
-       TEST_ASSERT_TRUE_UPGRADE(icon != NULL);
+       TEST_ASSERT_TRUE(icon != NULL);
 
        const char *image_path = NULL;
        elm_image_file_get(icon, &image_path, NULL);
-       TEST_ASSERT_TRUE_UPGRADE(image_path != NULL);
+       TEST_ASSERT_TRUE(image_path != NULL);
 
        char expected_path[MAX_FILE_PATH_LEN] = {0};
        snprintf(expected_path, MAX_FILE_PATH_LEN, "%simages/%s", app_get_resource_path(), control_button_list[button_id].icon_image);
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(expected_path, image_path);
+       TEST_ASSERT_EQUAL_STRING(expected_path, image_path);
 
        Evas_Object * text = NULL;
        Evas_Object * bar = NULL;
@@ -160,13 +160,13 @@ static unit_case_func_t __case_control_button_create(void * data)
        switch (button->btn_type) {
        case MOMENTS_CONTROLS_BTN_TYPE_ICON_AND_TEXT:
                text = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(button->button_layout), CONTROLS_TEXT);
-               TEST_ASSERT_TRUE_UPGRADE(text != NULL);
+               TEST_ASSERT_TRUE(text != NULL);
 
-               TEST_ASSERT_EQUAL_STRING_UPGRADE(control_button_list[button_id].volume_text, elm_object_part_text_get(button->button_layout, CONTROLS_TEXT));
+               TEST_ASSERT_EQUAL_STRING(control_button_list[button_id].volume_text, elm_object_part_text_get(button->button_layout, CONTROLS_TEXT));
                break;
        case MOMENTS_CONTROLS_BTN_TYPE_ICON_AND_BAR:
                bar = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(button->button_layout), CONTROLS_BAR);
-               TEST_ASSERT_TRUE_UPGRADE(bar != NULL);
+               TEST_ASSERT_TRUE(bar != NULL);
 
                break;
        default :
@@ -188,8 +188,8 @@ static unit_case_func_t __case_check_control_button_position(void * data)
        for (button_index = 0; button_index < total_count; button_index++) {
                position_t *pos = moments_control_get_button_position(total_count, button_index);
 
-               TEST_ASSERT_EQUAL_INT_UPGRADE(icon_position[total_count][button_index].x, pos->x);
-               TEST_ASSERT_EQUAL_INT_UPGRADE(icon_position[total_count][button_index].y, pos->y);
+               TEST_ASSERT_EQUAL_INT(icon_position[total_count][button_index].x, pos->x);
+               TEST_ASSERT_EQUAL_INT(icon_position[total_count][button_index].y, pos->y);
        }
 
        TEST_CASE_DONE(s_info.group);
index b53e4b0cd231322ca0b4ac84c1387cd792d46a07..88e62f82533d8b96cfd0a940a2418e0e01d43354 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_FUNCTION_H__
 #define __TEST_FUNCTION_H__
 
@@ -5,7 +21,7 @@
 #if TEST_MODE
 
 #include <Elementary.h>
-#include <app.h>
+#include <tizen.h>
 #include <Evas.h>
 
 extern Evas_Object * __t__get_moments_view_layout(void);
@@ -72,5 +88,6 @@ extern int __t__get_volume_level();
 extern void __t__set_brightness_level(int level);
 extern int __t__get_brightness_level(void);
 #endif
+
 #endif
 
index b93a70015100e6909760756aa7a49e5e7c9d6167..6ce4d0d9453b3482797101788cca9cedfd291fc5 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../inc/test.h"
 #if (TEST_MODE == TEST_APP)
 
index b1f1a85693e38a38de5940812bf2c95471713a52..b252bfad49273926c3a6843bc1d5b687cfa10e75 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_UNIT_H__
 #define __TEST_UNIT_H__
 
index 7acb5db81f436b2c1a419cb63bcbe317d2ffb883..c06c1a97c1a23194d32dca875126c09c1c226273 100755 (executable)
@@ -1,84 +1,64 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_UNIT_ASSERT_H__
 #define __TEST_UNIT_ASSERT_H__
 
 #include "../../../inc/test.h"
 #if TEST_MODE
 
-#include <app.h>
+#include <tizen.h>
 
 #define TEST_ASSERT_TRUE(value) { \
                bool __ret = unit_assert_true((value), (__FUNCTION__), (__LINE__)); \
-               if (!__ret) { \
-                       return; \
-               } \
-       }
-#define TEST_ASSERT_EQUAL_INT(expected_value, input_value) { \
-               bool __ret = unit_assert_equal_int((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
-               if (!__ret) { \
-                       return; \
-               } \
-       }
-#define TEST_ASSERT_EQUAL_DOUBLE(expected_value, input_value) { \
-               bool __ret = unit_assert_equal_double((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
-               if (!__ret) { \
-                       return; \
-               } \
-       }
-#define TEST_ASSERT_EQUAL_STRING(expected_value, input_value) { \
-               bool __ret = unit_assert_equal_string((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
-               if (!__ret) { \
-                       return; \
-               } \
-       }
-#define TEST_ASSERT_EQUAL_OBJECT(expected_value, input_value, compare_func) { \
-               bool __ret = unit_assert_equal_object((expected_value), (input_value), (compare_func), (__FUNCTION__), (__LINE__)); \
-               if (!__ret) { \
-                       return; \
-               } \
-       }
-#define TEST_ASSERT_EQUAL_LOG(input_value) { \
-               bool __ret = unit_equal_log((input_value), (__FUNCTION__), (__LINE__)); \
-               if (!__ret) { \
-                       return; \
-               } \
-       }
-#define TEST_ASSERT_TRUE_UPGRADE(value) { \
-               bool __ret = unit_assert_true_upgrade((value), (__FUNCTION__), (__LINE__)); \
                if (!__ret) { \
                        TEST_CASE_FAIL(); \
                        return EINA_FALSE; \
                } \
        }
-#define TEST_ASSERT_EQUAL_INT_UPGRADE(expected_value, input_value) { \
-               bool __ret = unit_assert_equal_int_upgrade((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_INT(expected_value, input_value) { \
+               bool __ret = unit_assert_equal_int((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
                if (!__ret) { \
                        TEST_CASE_FAIL(); \
                        return EINA_FALSE; \
                } \
        }
-#define TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(expected_value, input_value) { \
-               bool __ret = unit_assert_equal_double_upgrade((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_DOUBLE(expected_value, input_value) { \
+               bool __ret = unit_assert_equal_double((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
                if (!__ret) { \
                        TEST_CASE_FAIL(); \
                        return EINA_FALSE; \
                } \
        }
-#define TEST_ASSERT_EQUAL_STRING_UPGRADE(expected_value, input_value) { \
-               bool __ret = unit_assert_equal_string_upgrade((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_STRING(expected_value, input_value) { \
+               bool __ret = unit_assert_equal_string((expected_value), (input_value), (__FUNCTION__), (__LINE__)); \
                if (!__ret) { \
                        TEST_CASE_FAIL(); \
                        return EINA_FALSE; \
                } \
        }
-#define TEST_ASSERT_EQUAL_OBJECT_UPGRADE(expected_value, input_value, compare_func) { \
-               bool __ret = unit_assert_equal_object_upgrade((expected_value), (input_value), (compare_func), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_OBJECT(expected_value, input_value, compare_func) { \
+               bool __ret = unit_assert_equal_object((expected_value), (input_value), (compare_func), (__FUNCTION__), (__LINE__)); \
                if (!__ret) { \
                        TEST_CASE_FAIL(); \
                        return EINA_FALSE; \
                } \
        }
-#define TEST_ASSERT_EQUAL_LOG_UPGRADE(input_value) { \
-               bool __ret = unit_equal_log_upgrade((input_value), (__FUNCTION__), (__LINE__)); \
+#define TEST_ASSERT_EQUAL_LOG(input_value) { \
+               bool __ret = unit_equal_log((input_value), (__FUNCTION__), (__LINE__)); \
                if (!__ret) { \
                        TEST_CASE_FAIL(); \
                        return EINA_FALSE; \
@@ -92,13 +72,6 @@ bool unit_assert_equal_string(const char * expected_value, const char * input_va
 bool unit_assert_equal_object(const void * expected_value, const void * input_value,
                bool(*compare_func)(const void * object1, const void * object2),
                const char * func, const int line);
-bool unit_assert_true_upgrade(const int value, const char * func, const int line);
-bool unit_assert_equal_int_upgrade(const int expected_value, const int input_value, const char * func, const int line);
-bool unit_assert_equal_double_upgrade(const double expected_value, const double input_value, const char * func, const int line);
-bool unit_assert_equal_string_upgrade(const char * expected_value, const char * input_value, const char * func, const int line);
-bool unit_assert_equal_object_upgrade(const void * expected_value, const void * input_value,
-               bool(*compare_func)(const void * object1, const void * object2),
-               const char * func, const int line);
 
 #endif
 
index 9741b47fc1a03e3098bc32abf92d60e40cc564ac..2b18aeba26e2bf319986494bcaf057bfb0af98c0 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_UNIT_GROUP_H__
 #define __TEST_UNIT_GROUP_H__
 
@@ -7,7 +23,6 @@
 #include "unit_result.h"
 
 #include <Elementary.h>
-#include <app.h>
 
 #define TEST_CASE_MAX 100
 #define GROUP_COUNT_MAX 200
old mode 100644 (file)
new mode 100755 (executable)
index f37a473..fa8a200
@@ -1,10 +1,26 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_UNIT_LOG_BUF_H__
 #define __TEST_UNIT_LOG_BUF_H__
 
 #include "../../../inc/test.h"
 #if TEST_MODE
 
-#include <app.h>
+#include <tizen.h>
 
 void unit_write_log(char *fmt, ...);
 void unit_clear_log(void);
old mode 100644 (file)
new mode 100755 (executable)
index da42750..bf25e7b
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_RESULT_H__
 #define __TEST_RESULT_H__
 
index a4f248cc55a51959befc7c12661a379e35285e67..e7f8394a3fb7e5f4dc5a98c76be3d33d46058f4a 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../inc/test.h"
 #if TEST_MODE
 
index ba6af1e31358ab03bcf2ddededab855274fdd459..819eb85dd2e9134fc2a356001eedd9f7979b94e5 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../inc/test.h"
 #if TEST_MODE
 
@@ -7,58 +23,6 @@
 #include <math.h>
 
 bool unit_assert_true(const int value, const char * func, const int line)
-{
-       if (value == 0) {
-               __T("%s (%d) FAIL", func, line);
-               return false;
-       }
-
-       return true;
-}
-
-bool unit_assert_equal_int(const int expected_value, const int input_value, const char * func, const int line)
-{
-       if (expected_value != input_value) {
-               __T("%s (%d) FAIL, Expected %d was %d", func, line, expected_value, input_value);
-               return false;
-       }
-
-       return true;
-}
-
-bool unit_assert_equal_double(const double expected_value, const double input_value, const char * func, const int line)
-{
-       if (fabs(expected_value - input_value) >= 1e-10) {
-               __T("%s (%d) FAIL, Expected %.10lf was %.10lf", func, line, expected_value, input_value);
-               return false;
-       }
-
-       return true;
-}
-
-bool unit_assert_equal_string(const char * expected_value, const char * input_value, const char * func, const int line)
-{
-       if (strcmp(expected_value, input_value)) {
-               __T("%s (%d) FAIL, Expected %s was %s", func, line, expected_value, input_value);
-               return false;
-       }
-
-       return true;
-}
-
-bool unit_assert_equal_object(const void * expected_value, const void * input_value,
-               bool(*compare_func)(const void * object1, const void * object2),
-               const char * func, const int line)
-{
-       if (!compare_func(expected_value, input_value)) {
-               __T("%s (%d) FAIL, Objects are not equal", func, line);
-               return false;
-       }
-
-       return true;
-}
-
-bool unit_assert_true_upgrade(const int value, const char * func, const int line)
 {
        if (value == 0) {
                unit_group_t * group = unit_get_current_group();
@@ -70,7 +34,7 @@ bool unit_assert_true_upgrade(const int value, const char * func, const int line
        return true;
 }
 
-bool unit_assert_equal_int_upgrade(const int expected_value, const int input_value, const char * func, const int line)
+bool unit_assert_equal_int(const int expected_value, const int input_value, const char * func, const int line)
 {
        if (expected_value != input_value) {
                unit_group_t * group = unit_get_current_group();
@@ -82,7 +46,7 @@ bool unit_assert_equal_int_upgrade(const int expected_value, const int input_val
        return true;
 }
 
-bool unit_assert_equal_double_upgrade(const double expected_value, const double input_value, const char * func, const int line)
+bool unit_assert_equal_double(const double expected_value, const double input_value, const char * func, const int line)
 {
        if (fabs(expected_value - input_value) >= 1e-10) {
                unit_group_t * group = unit_get_current_group();
@@ -94,7 +58,7 @@ bool unit_assert_equal_double_upgrade(const double expected_value, const double
        return true;
 }
 
-bool unit_assert_equal_string_upgrade(const char * expected_value, const char * input_value, const char * func, const int line)
+bool unit_assert_equal_string(const char * expected_value, const char * input_value, const char * func, const int line)
 {
        if (strcmp(expected_value, input_value)) {
                unit_group_t * group = unit_get_current_group();
@@ -106,7 +70,7 @@ bool unit_assert_equal_string_upgrade(const char * expected_value, const char *
        return true;
 }
 
-bool unit_assert_equal_object_upgrade(const void * expected_value, const void * input_value,
+bool unit_assert_equal_object(const void * expected_value, const void * input_value,
                bool(*compare_func)(const void * object1, const void * object2),
                const char * func, const int line)
 {
index 10530096154ac22f77c7415b0863b8d52575c3d7..f4a05ef1c45f4b4ca715c215066f3c173f9e52fd 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../inc/test.h"
 #if TEST_MODE
 
index 7b1a834d45a5e6c5908c64c04b21e9fce985e99a..a733c9a98164079e3b1506cd422c93cba0f48d12 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../inc/test.h"
 #if TEST_MODE
 
@@ -39,16 +55,6 @@ void unit_clear_log(void)
 }
 
 bool unit_equal_log(const char * input_value, const char * func, const int line)
-{
-       if (strcmp(s_info.log_buf, input_value)) {
-               __T("%s (%d) FAIL, Expected %s was %s", func, line, input_value, s_info.log_buf);
-               return false;
-       }
-
-       return true;
-}
-
-bool unit_equal_log_upgrade(const char * input_value, const char * func, const int line)
 {
        if (strcmp(s_info.log_buf, input_value)) {
                unit_group_t * group = unit_get_current_group();
old mode 100644 (file)
new mode 100755 (executable)
index 8bb7460..e30bca8
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../inc/test.h"
 #if TEST_MODE
 
index 081810c449cca8885f2c3092ad204785b8c6f9c1..3cdb20877193afa68af223ab4f080c9c2963bd70 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)
 
index 2ee1bf82dc4ab17b8e18ee6b7e81cadac6e57387..0f656cf53c02838da5a7f9bf6cdec5c9cd0b4ba9 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_TEST_LOG_H__
 #define __TEST_TEST_LOG_H__
 
@@ -6,7 +22,6 @@
 #include "../../../../inc/app_log.h"
 #include "../../inc/unit.h"
 
-#include <app.h>
 #include <string.h>
 
 void unit_test_log_append_unit_init(char * buf);
index 83d62c4339294ff72877c49c59854530b09cc927..206cfb295fabea5e18f35c5b23650fc356d514ff 100755 (executable)
@@ -1,9 +1,25 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)
 
 #include "unit_test_assert.h"
 
-#include <app.h>
+#include <tizen.h>
 #include <math.h>
 #include <stdlib.h>
 #include <memory.h>
@@ -51,78 +67,78 @@ void unit_test_assert(void)
 
 static Eina_Bool __unit_test_assert_bool_ok(void)
 {
-       TEST_ASSERT_TRUE_UPGRADE(1);
-       TEST_ASSERT_TRUE_UPGRADE(-1);
-       TEST_ASSERT_TRUE_UPGRADE(987654321);
+       TEST_ASSERT_TRUE(1);
+       TEST_ASSERT_TRUE(-1);
+       TEST_ASSERT_TRUE(987654321);
 
        return EINA_TRUE;
 }
 
 static Eina_Bool __unit_test_assert_bool_fail(void)
 {
-       TEST_ASSERT_TRUE_UPGRADE(0);
+       TEST_ASSERT_TRUE(0);
 
        return EINA_TRUE;
 }
 
 static Eina_Bool __unit_test_assert_int_ok(void)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(1, 1);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(-1, -1);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(987654321, 987654321);
+       TEST_ASSERT_EQUAL_INT(1, 1);
+       TEST_ASSERT_EQUAL_INT(-1, -1);
+       TEST_ASSERT_EQUAL_INT(987654321, 987654321);
 
        return EINA_TRUE;
 }
 
 static Eina_Bool __unit_test_assert_int_fail(void)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(100, 100);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(1, 2);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(-1, -1);
+       TEST_ASSERT_EQUAL_INT(100, 100);
+       TEST_ASSERT_EQUAL_INT(1, 2);
+       TEST_ASSERT_EQUAL_INT(-1, -1);
 
        return EINA_TRUE;
 }
 
 static Eina_Bool __unit_test_assert_double_ok(void)
 {
-       TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(1.0, 1.0);
-       TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.1, 0.1);
-       TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.000001, 0.000001);
-       TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.00000000001, 0.00000000002);
+       TEST_ASSERT_EQUAL_DOUBLE(1.0, 1.0);
+       TEST_ASSERT_EQUAL_DOUBLE(0.1, 0.1);
+       TEST_ASSERT_EQUAL_DOUBLE(0.000001, 0.000001);
+       TEST_ASSERT_EQUAL_DOUBLE(0.00000000001, 0.00000000002);
 
        return EINA_TRUE;
 }
 
 static Eina_Bool __unit_test_assert_double_fail(void)
 {
-       TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.00000000001, 0.00000000002);
-       TEST_ASSERT_EQUAL_DOUBLE_UPGRADE(0.0000000001, 0.0000000002);
+       TEST_ASSERT_EQUAL_DOUBLE(0.00000000001, 0.00000000002);
+       TEST_ASSERT_EQUAL_DOUBLE(0.0000000001, 0.0000000002);
 
        return EINA_TRUE;
 }
 
 static Eina_Bool __unit_test_assert_string_ok(void)
 {
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("abcdefg", "abcdefg");
+       TEST_ASSERT_EQUAL_STRING("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+       TEST_ASSERT_EQUAL_STRING("abcdefg", "abcdefg");
        char str1[] = "abcdefghijklmnopqrstuvwxyz";
        char str2[] = "abcdefghijklmnopqrstuvwxyz";
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(str1, str2);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(str1 + 5, str2 + 5);
+       TEST_ASSERT_EQUAL_STRING(str1, str2);
+       TEST_ASSERT_EQUAL_STRING(str1 + 5, str2 + 5);
        char str3[] = "abcdefghijklmnopqrstuvwxyz";
        char str4[] = "aabcdefghijklmnopqrstuvwxyz";
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(str3, str4+1);
+       TEST_ASSERT_EQUAL_STRING(str3, str4+1);
 
        return EINA_TRUE;
 }
 
 static Eina_Bool __unit_test_assert_string_fail(void)
 {
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+       TEST_ASSERT_EQUAL_STRING("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
 
        char str1[] = "abcdefghijklmnopqrstuvwxyz";
        char str2[] = "abcdefghijklmnopqrstuvwxyz";
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(str1, str2 + 1);
+       TEST_ASSERT_EQUAL_STRING(str1, str2 + 1);
 
        return EINA_TRUE;
 }
@@ -131,22 +147,22 @@ static Eina_Bool __unit_test_assert_object_ok(void)
 {
        object_t a = { 0, 0, 0, 0, 0 };
        object_t b = { 0, 0, 0, 0, 0 };
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
        a.a = 1;
        b.a = 1;
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
        a.b = 0.00000000001;
        b.b = 0.00000000002;
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
        a.func_a = __unit_test_assert_object_ok;
        b.func_a = __unit_test_assert_object_ok;
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
 
        object_t * p_a = (object_t *)malloc(sizeof(object_t));
        object_t * p_b = (object_t *)malloc(sizeof(object_t));
        memset(p_a, 0, sizeof(object_t));
        memset(p_b, 0, sizeof(object_t));
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(p_a, p_b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(p_a, p_b, __object_equal);
        p_a->a = 1;
        p_b->a = 1;
        p_a->b = 0.00000000001;
@@ -155,7 +171,7 @@ static Eina_Bool __unit_test_assert_object_ok(void)
        p_b->func_a = __unit_test_assert_object_ok;
        p_a->c = 1;
        p_b->c = 1;
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(p_a, p_b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(p_a, p_b, __object_equal);
 
        free(p_a);
        free(p_b);
@@ -167,16 +183,16 @@ static Eina_Bool __unit_test_assert_object_fail(void)
 {
        object_t a = { 0, 0, 0, 0, 0 };
        object_t b = { 0, 0, 0, 0, 0 };
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
        a.a = 1;
        b.a = 1;
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
        a.b = 0.0000000001;
        b.b = 0.0000000002;
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
        a.func_a = __unit_test_assert_object_ok;
        b.func_a = __unit_test_assert_object_ok;
-       TEST_ASSERT_EQUAL_OBJECT_UPGRADE(&a, &b, __object_equal);
+       TEST_ASSERT_EQUAL_OBJECT(&a, &b, __object_equal);
 
        return EINA_TRUE;
 }
@@ -185,14 +201,14 @@ static Eina_Bool __unit_test_assert_log_ok(void)
 {
        char * buf = __t__get_unit_log_buf();
        strcpy(buf, "");
-       TEST_ASSERT_EQUAL_LOG_UPGRADE("");
+       TEST_ASSERT_EQUAL_LOG("");
 
        __T("assert");
-       TEST_ASSERT_EQUAL_LOG_UPGRADE("assert\n");
+       TEST_ASSERT_EQUAL_LOG("assert\n");
        __T("%s", "log");
-       TEST_ASSERT_EQUAL_LOG_UPGRADE("assert\nlog\n");
+       TEST_ASSERT_EQUAL_LOG("assert\nlog\n");
        __T("%d %.2lf ok", 99, 0.01);
-       TEST_ASSERT_EQUAL_LOG_UPGRADE("assert\nlog\n99 0.01 ok\n");
+       TEST_ASSERT_EQUAL_LOG("assert\nlog\n99 0.01 ok\n");
 
        return EINA_TRUE;
 }
@@ -201,12 +217,12 @@ static Eina_Bool __unit_test_assert_log_fail(void)
 {
        char * buf = __t__get_unit_log_buf();
        strcpy(buf, "");
-       TEST_ASSERT_EQUAL_LOG_UPGRADE("");
+       TEST_ASSERT_EQUAL_LOG("");
 
        __T("assert");
        __T("%s", "log");
        __T("%d %.2lf ok", 99, 0.01);
-       TEST_ASSERT_EQUAL_LOG_UPGRADE("assert\nlog\n99 0.01 no\n");
+       TEST_ASSERT_EQUAL_LOG("assert\nlog\n99 0.01 no\n");
 
        return EINA_TRUE;
 }
index 90d6ae7b27257a1c457a736bb0df5349953dc7bc..2ba18597cea2fdf7b165ec0f50f8a7452dc1c8b2 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_TEST_UNIT_ASSERT_H__
 #define __TEST_TEST_UNIT_ASSERT_H__
 
@@ -6,7 +22,6 @@
 #include "../../../../inc/app_log.h"
 #include "../../inc/unit.h"
 
-#include <app.h>
 #include <string.h>
 
 #define __unit_test_run_assert(result) { if ((result) == false) __TU("!!!!!ASSERT MACRO TEST FAIL!!!!!"); }
index f06f08989e85893ebbd24d664543eeeafea6dcf7..6eb94f2d1dd34cf5f2707b4c533d2f757e27fe60 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)
 
index 2566981540904775c2acd9d19f25a458bc5490d9..abc31380cd2c2851758b8e5c12d12508faac8685 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_TEST_UNIT_FUNCTION_H__
 #define __TEST_TEST_UNIT_FUNCTION_H__
 
@@ -6,7 +22,6 @@
 #include "../../../../inc/app_log.h"
 #include "../../inc/unit.h"
 
-#include <app.h>
 #include <string.h>
 
 #define __unit_test_run_function(result) { if ((result) == false) __TU("##########FUNCTION TEST FAIL##########"); }
index dfad2f61a003d08a45b5ed0955e80163ce355288..fc627defffef76f6a8120c731509b3c5095670e5 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)
 
@@ -15,12 +31,12 @@ static void __group_finish(unit_group_t * group) {}
 static Eina_Bool __unit_test_group_new(void)
 {
        unit_group_t * group = unit_group_new("group_1", __group_finish);
-       TEST_ASSERT_TRUE_UPGRADE(group != NULL);
-       TEST_ASSERT_EQUAL_STRING_UPGRADE("group_1", group->name);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, group->result->ran_case);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, group->result->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, group->result->failed);
-       TEST_ASSERT_TRUE_UPGRADE(group->finish != NULL)
+       TEST_ASSERT_TRUE(group != NULL);
+       TEST_ASSERT_EQUAL_STRING("group_1", group->name);
+       TEST_ASSERT_EQUAL_INT(0, group->result->ran_case);
+       TEST_ASSERT_EQUAL_INT(0, group->result->passed);
+       TEST_ASSERT_EQUAL_INT(0, group->result->failed);
+       TEST_ASSERT_TRUE(group->finish != NULL)
 
        unit_group_del(group);
 
index df3937b4ae2e7fde1bc99366d1797a163f0ab148..16097f8d6426f9453709fb2b8297f24d7c7e9c79 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)
 
@@ -18,12 +34,12 @@ static Eina_Bool __unit_test_write_log(void)
 {
        char * buf = __t__get_unit_log_buf();
        strcpy(buf, "");
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(buf, "");
+       TEST_ASSERT_EQUAL_STRING(buf, "");
 
        unit_write_log("write");
        unit_write_log("log");
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(buf, "write\nlog\n");
+       TEST_ASSERT_EQUAL_STRING(buf, "write\nlog\n");
 
        return EINA_TRUE;
 }
@@ -32,11 +48,11 @@ static Eina_Bool __unit_test_clear_log(void)
 {
        char * buf = __t__get_unit_log_buf();
        strcpy(buf, "clear");
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(buf, "clear");
+       TEST_ASSERT_EQUAL_STRING(buf, "clear");
 
        unit_clear_log();
 
-       TEST_ASSERT_EQUAL_STRING_UPGRADE(buf, "");
+       TEST_ASSERT_EQUAL_STRING(buf, "");
 
        return EINA_TRUE;
 }
index a7f71666b053b4f7d774813ca84acf027303e67e..7835c8d4dffe53dd23924b18b0abe1cd2fc228c9 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)
 
@@ -21,9 +37,9 @@ static Eina_Bool __unit_test_uint_result(void)
 {
        unit_result_t * result = unit_result_new();
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->ran_case);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->failed);
+       TEST_ASSERT_EQUAL_INT(0, result->ran_case);
+       TEST_ASSERT_EQUAL_INT(0, result->passed);
+       TEST_ASSERT_EQUAL_INT(0, result->failed);
 
        int i = 0;
        for (i = 0; i < 3; i++) unit_result_pass(result);
@@ -33,29 +49,29 @@ static Eina_Bool __unit_test_uint_result(void)
        for (i = 0; i < 3; i++) unit_result_pass(result);
        for (i = 0; i < 2; i++) unit_result_fail(result);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(15, result->ran_case);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(9, result->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(6, result->failed);
+       TEST_ASSERT_EQUAL_INT(15, result->ran_case);
+       TEST_ASSERT_EQUAL_INT(9, result->passed);
+       TEST_ASSERT_EQUAL_INT(6, result->failed);
 
        unit_result_t * result2 = unit_result_new();
        for (i = 0; i < 9; i++) unit_result_pass(result2);
        for (i = 0; i < 8; i++) unit_result_fail(result2);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(17, result2->ran_case);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(9, result2->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(8, result2->failed);
+       TEST_ASSERT_EQUAL_INT(17, result2->ran_case);
+       TEST_ASSERT_EQUAL_INT(9, result2->passed);
+       TEST_ASSERT_EQUAL_INT(8, result2->failed);
 
        unit_result_add(result, result2);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(32, result->ran_case);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(18, result->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(14, result->failed);
+       TEST_ASSERT_EQUAL_INT(32, result->ran_case);
+       TEST_ASSERT_EQUAL_INT(18, result->passed);
+       TEST_ASSERT_EQUAL_INT(14, result->failed);
 
        unit_result_init(result);
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->ran_case);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->failed);
+       TEST_ASSERT_EQUAL_INT(0, result->ran_case);
+       TEST_ASSERT_EQUAL_INT(0, result->passed);
+       TEST_ASSERT_EQUAL_INT(0, result->failed);
 
        unit_result_del(result2);
        unit_result_del(result);
@@ -73,19 +89,19 @@ static Eina_Bool __unit_test_unit_init(void)
 
        for (i = 0; i < 9; i++) unit_result_pass(result);
        for (i = 0; i < 8; i++) unit_result_fail(result);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(8, result->failed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(9, result->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(17, result->ran_case);
+       TEST_ASSERT_EQUAL_INT(8, result->failed);
+       TEST_ASSERT_EQUAL_INT(9, result->passed);
+       TEST_ASSERT_EQUAL_INT(17, result->ran_case);
 
        unit_init();
 
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->failed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(0, result->ran_case);
+       TEST_ASSERT_EQUAL_INT(0, result->failed);
+       TEST_ASSERT_EQUAL_INT(0, result->passed);
+       TEST_ASSERT_EQUAL_INT(0, result->ran_case);
 
        char buf[1024] = { 0, };
        unit_test_log_append_unit_init(buf);
-       TEST_ASSERT_EQUAL_LOG_UPGRADE(buf);
+       TEST_ASSERT_EQUAL_LOG(buf);
 
        return EINA_TRUE;
 }
@@ -99,15 +115,15 @@ static Eina_Bool __unit_test_unit_fini(void)
        unit_result_t * result = __t__get_unit_result();
        for (i = 0; i < 9; i++) unit_result_pass(result);
        for (i = 0; i < 8; i++) unit_result_fail(result);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(8, result->failed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(9, result->passed);
-       TEST_ASSERT_EQUAL_INT_UPGRADE(17, result->ran_case);
+       TEST_ASSERT_EQUAL_INT(8, result->failed);
+       TEST_ASSERT_EQUAL_INT(9, result->passed);
+       TEST_ASSERT_EQUAL_INT(17, result->ran_case);
 
        char buf[1024] = { 0, };
        unit_test_log_append_unit_fini(buf, result);
 
        unit_fini();
-       TEST_ASSERT_EQUAL_LOG_UPGRADE(buf);
+       TEST_ASSERT_EQUAL_LOG(buf);
 
        unit_clear_log();
 
@@ -120,7 +136,7 @@ static Eina_Bool __unit_test_unit_fini(void)
 
        unit_fini();
 
-       TEST_ASSERT_EQUAL_LOG_UPGRADE(buf);
+       TEST_ASSERT_EQUAL_LOG(buf);
 
        return EINA_TRUE;
 }
index 04c3229b131671eaf25f01473bc044e9a89da469..7ad31097299b51d7ec3f47f9967710f3d6f3bd30 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)
 
index 3fc4c82ed6e34a2b6215200e3166bd0ba674430c..95e070067e3c83d2ee491eb1aa41c35ee8232b97 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #ifndef __TEST_TEST_UNIT_GROUP_H__
 #define __TEST_TEST_UNIT_GROUP_H__
 
@@ -7,7 +23,6 @@
 #include "../../../../inc/app_log.h"
 #include "../../inc/unit.h"
 
-#include <app.h>
 #include <string.h>
 
 void unit_test_group(void);
index 013f5d02067c83d94178f7824eebbaba0460b07d..92764bcb8af48a3577638ac0b5db85c278469fd9 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)
 
@@ -25,8 +41,8 @@ static void __tear_down(void)
 
 static unit_case_func_t __pass_case(void * data)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
-       TEST_ASSERT_TRUE_UPGRADE(true);
+       TEST_ASSERT_EQUAL_INT(99, 99);
+       TEST_ASSERT_TRUE(true);
 
        __T("pass case : %d", (int)data);
 
@@ -36,8 +52,8 @@ static unit_case_func_t __pass_case(void * data)
 static unit_case_func_t __continue_pass(void * data);
 static unit_case_func_t __pass_continue_case(void * data)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
-       TEST_ASSERT_TRUE_UPGRADE(true);
+       TEST_ASSERT_EQUAL_INT(99, 99);
+       TEST_ASSERT_TRUE(true);
 
        __T("pass continue case : %d", (int)data);
 
@@ -46,8 +62,8 @@ static unit_case_func_t __pass_continue_case(void * data)
 
 static unit_case_func_t __continue_pass(void * data)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
-       TEST_ASSERT_TRUE_UPGRADE(true);
+       TEST_ASSERT_EQUAL_INT(99, 99);
+       TEST_ASSERT_TRUE(true);
 
        __T("continue : %d", (int)data);
        TEST_CASE_DONE(s_info.group);
@@ -80,10 +96,10 @@ static void __group_tear_down(void *data)
 
 static unit_case_func_t __fail_case(void * data)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
+       TEST_ASSERT_EQUAL_INT(99, 99);
        __T("fail case : %d", (int)data);
 
-       TEST_ASSERT_TRUE_UPGRADE(false);
+       TEST_ASSERT_TRUE(false);
 
        __T("fail case done");
 
@@ -93,7 +109,7 @@ static unit_case_func_t __fail_case(void * data)
 static unit_case_func_t __continue_fail(void * data);
 static unit_case_func_t __fail_continue_case(void * data)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
+       TEST_ASSERT_EQUAL_INT(99, 99);
        __T("fail continue case : %d", (int)data);
 
        TEST_CASE_CONTINUE(0.1, __continue_fail, data);
@@ -101,11 +117,11 @@ static unit_case_func_t __fail_continue_case(void * data)
 
 static unit_case_func_t __continue_fail(void * data)
 {
-       TEST_ASSERT_EQUAL_INT_UPGRADE(99, 99);
+       TEST_ASSERT_EQUAL_INT(99, 99);
 
        __T("continue : %d", (int)data);
 
-       TEST_ASSERT_TRUE_UPGRADE(false);
+       TEST_ASSERT_TRUE(false);
 
        __T("continue done");
 
index 46b1d586f5b178ceb6c71d4a476477dbf7656ad5..698a8de9397f93af3a966a7e9fc728f7a2a7f62b 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 #include "../../../inc/test.h"
 #if (TEST_MODE == TEST_UNIT)