From f77fbe4095ecac47a31ae5b5546ce0c4870fba01 Mon Sep 17 00:00:00 2001 From: Prince Kr Dubey Date: Wed, 19 Jan 2011 23:44:23 +0530 Subject: [PATCH] [TickerNoti] Modified to remove signal6 error. Review comments are taken care. Change-Id: I5006aa67048b41ab10a2ff695eb3505ce8a2164f --- TC/elm_ts/tickernoti/Makefile | 32 ++--- TC/elm_ts/tickernoti/tet_captured | 1 - .../tickernoti/utc_UIFW_elm_tickernoti_add_func.c | 102 ++++++++-------- ...IFW_elm_tickernoti_detailview_button_get_func.c | 109 +++++++++-------- ...IFW_elm_tickernoti_detailview_button_set_func.c | 127 +++++++++++--------- .../utc_UIFW_elm_tickernoti_detailview_get_func.c | 97 ++++++++------- ..._UIFW_elm_tickernoti_detailview_icon_get_func.c | 128 ++++++++++---------- ..._UIFW_elm_tickernoti_detailview_icon_set_func.c | 117 ++++++++++--------- ...UIFW_elm_tickernoti_detailview_label_get_func.c | 101 ++++++++-------- ...UIFW_elm_tickernoti_detailview_label_set_func.c | 103 ++++++++-------- .../utc_UIFW_elm_tickernoti_icon_get_func.c | 130 +++++++++++---------- .../utc_UIFW_elm_tickernoti_icon_set_func.c | 121 ++++++++++--------- .../utc_UIFW_elm_tickernoti_label_set_func.c | 101 ++++++++-------- .../utc_UIFW_elm_tickernoti_mode_get_func.c | 101 ++++++++-------- .../utc_UIFW_elm_tickernoti_mode_set_func.c | 110 +++++++++-------- .../utc_UIFW_elm_tickernoti_rotation_set_func.c | 96 +++++++-------- 16 files changed, 795 insertions(+), 781 deletions(-) delete mode 100644 TC/elm_ts/tickernoti/tet_captured diff --git a/TC/elm_ts/tickernoti/Makefile b/TC/elm_ts/tickernoti/Makefile index 669692c..6da26e9 100755 --- a/TC/elm_ts/tickernoti/Makefile +++ b/TC/elm_ts/tickernoti/Makefile @@ -1,21 +1,21 @@ CC ?= gcc -TARGETS = uts_elm_tickernoti_add_func \ - uts_elm_tickernoti_icon_set_func \ - uts_elm_tickernoti_icon_get_func \ - uts_elm_tickernoti_label_set_func \ - uts_elm_tickernoti_label_get_func \ - uts_elm_tickernoti_detailview_label_set_func \ - uts_elm_tickernoti_detailview_label_get_func \ - uts_elm_tickernoti_detailview_button_set_func \ - uts_elm_tickernoti_detailview_button_get_func \ - uts_elm_tickernoti_detailview_icon_set_func \ - uts_elm_tickernoti_detailview_icon_get_func \ - uts_elm_tickernoti_detailview_get_func \ - uts_elm_tickernoti_rotation_set_func \ - uts_elm_tickernoti_rotation_get_func \ - uts_elm_tickernoti_mode_set_func \ - uts_elm_tickernoti_mode_get_func +TARGETS = utc_UIFW_elm_tickernoti_add_func \ + utc_UIFW_elm_tickernoti_icon_set_func \ + utc_UIFW_elm_tickernoti_icon_get_func \ + utc_UIFW_elm_tickernoti_label_set_func \ + utc_UIFW_elm_tickernoti_label_get_func \ + utc_UIFW_elm_tickernoti_detailview_label_set_func \ + utc_UIFW_elm_tickernoti_detailview_label_get_func \ + utc_UIFW_elm_tickernoti_detailview_button_set_func \ + utc_UIFW_elm_tickernoti_detailview_button_get_func \ + utc_UIFW_elm_tickernoti_detailview_icon_set_func \ + utc_UIFW_elm_tickernoti_detailview_icon_get_func \ + utc_UIFW_elm_tickernoti_detailview_get_func \ + utc_UIFW_elm_tickernoti_rotation_set_func \ + utc_UIFW_elm_tickernoti_rotation_get_func \ + utc_UIFW_elm_tickernoti_mode_set_func \ + utc_UIFW_elm_tickernoti_mode_get_func PKGS = elementary diff --git a/TC/elm_ts/tickernoti/tet_captured b/TC/elm_ts/tickernoti/tet_captured deleted file mode 100644 index 730dfe4..0000000 --- a/TC/elm_ts/tickernoti/tet_captured +++ /dev/null @@ -1 +0,0 @@ -make: `utc_UIFW_elm_tickernoti_mode_get_func' is up to date. diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_add_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_add_func.c index 2b2bb8d..3bcceb9 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_add_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_add_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; static void startup(void); @@ -39,32 +38,32 @@ static void utc_UIFW_elm_tickernoti_add_func_01(void); static void utc_UIFW_elm_tickernoti_add_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_add_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_add_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_add_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_add_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); } /** @@ -72,18 +71,18 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_add_func_01(void) { - Evas_Object *tickernoti; - - tickernoti = elm_tickernoti_add(main_win); - - if (!tickernoti) { - tet_infoline("elm_tickernoti_add() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - evas_object_del(tickernoti); - tickernoti = NULL; - tet_result(TET_PASS); + Evas_Object *tickernoti; + + tickernoti = elm_tickernoti_add(main_win); + + if (!tickernoti) { + tet_infoline("elm_tickernoti_add() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + evas_object_del(tickernoti); + tickernoti = NULL; + tet_result(TET_PASS); } /** @@ -91,16 +90,11 @@ static void utc_UIFW_elm_tickernoti_add_func_01(void) */ static void utc_UIFW_elm_tickernoti_add_func_02(void) { - Evas_Object *tickernoti; - - tickernoti = elm_tickernoti_add(NULL); - - if (!tickernoti) { - tet_infoline("elm_tickernoti_add() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - evas_object_del(tickernoti); - tickernoti = NULL; - tet_result(TET_PASS); + Evas_Object *tickernoti; + + tickernoti = elm_tickernoti_add(NULL); + + evas_object_del(tickernoti); + tickernoti = NULL; + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_button_get_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_button_get_func.c index 2bc44f8..fdd1c84 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_button_get_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_button_get_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +39,36 @@ static void utc_UIFW_elm_tickernoti_detailview_button_get_func_01(void); static void utc_UIFW_elm_tickernoti_detailview_button_get_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_detailview_button_get_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_detailview_button_get_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_detailview_button_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_detailview_button_get_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,20 +76,20 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_detailview_button_get_func_01(void) { - Evas_Object *button = NULL; - Evas_Object *test_button = NULL; + Evas_Object *button = NULL; + Evas_Object *test_button = NULL; - button = elm_button_add(tickernoti); + button = elm_button_add(elm_tickernoti_detailview_get(tickernoti)); - elm_tickernoti_detailview_button_set(tickernoti, button); - test_button = elm_tickernoti_detailview_button_get(tickernoti); + elm_tickernoti_detailview_button_set(tickernoti, button); + test_button = elm_tickernoti_detailview_button_get(tickernoti); - if (test_button != button) { - tet_infoline("elm_tickernoti_detailview_button_get() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (test_button != button) { + tet_infoline("elm_tickernoti_detailview_button_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -98,18 +97,18 @@ static void utc_UIFW_elm_tickernoti_detailview_button_get_func_01(void) */ static void utc_UIFW_elm_tickernoti_detailview_button_get_func_02(void) { - Evas_Object *button = NULL; - Evas_Object *test_button = NULL; + Evas_Object *button = NULL; + Evas_Object *test_button = NULL; - button = elm_button_add(tickernoti); + button = elm_button_add(elm_tickernoti_detailview_get(tickernoti)); - elm_tickernoti_detailview_button_set(tickernoti, button); - test_button = elm_tickernoti_detailview_button_get(NULL); + elm_tickernoti_detailview_button_set(tickernoti, button); + test_button = elm_tickernoti_detailview_button_get(NULL); - if (test_button) { - tet_infoline("elm_tickernoti_detailview_button_get() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (test_button) { + tet_infoline("elm_tickernoti_detailview_button_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_button_set_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_button_set_func.c index e5ddde1..4426b28 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_button_set_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_button_set_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -38,38 +37,40 @@ void (*tet_cleanup)(void) = cleanup; static void utc_UIFW_elm_tickernoti_detailview_button_set_func_01(void); static void utc_UIFW_elm_tickernoti_detailview_button_set_func_02(void); +static void utc_UIFW_elm_tickernoti_detailview_button_set_func_03(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_detailview_button_set_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_detailview_button_set_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_detailview_button_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_detailview_button_set_func_02, NEGATIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_detailview_button_set_func_03, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,20 +78,20 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_detailview_button_set_func_01(void) { - Evas_Object *button = NULL; - Evas_Object *test_button = NULL; + Evas_Object *button = NULL; + Evas_Object *test_button = NULL; - button = elm_button_add(tickernoti); + button = elm_button_add(elm_tickernoti_detailview_get(tickernoti)); - elm_tickernoti_detailview_button_set(tickernoti, button); - test_button = elm_tickernoti_detailview_button_get(tickernoti); + elm_tickernoti_detailview_button_set(tickernoti, button); + test_button = elm_tickernoti_detailview_button_get(tickernoti); - if (test_button != button) { - tet_infoline("elm_tickernoti_detailview_button_set() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (test_button != button) { + tet_infoline("elm_tickernoti_detailview_button_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -98,18 +99,34 @@ static void utc_UIFW_elm_tickernoti_detailview_button_set_func_01(void) */ static void utc_UIFW_elm_tickernoti_detailview_button_set_func_02(void) { - Evas_Object *button = NULL; - Evas_Object *test_button = NULL; + Evas_Object *button = NULL; + Evas_Object *test_button = NULL; + + button = elm_button_add(elm_tickernoti_detailview_get(tickernoti)); + + elm_tickernoti_detailview_button_set(NULL, button); + test_button = elm_tickernoti_detailview_button_get(tickernoti); + + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_tickernoti_detailview_button_set() + */ +static void utc_UIFW_elm_tickernoti_detailview_button_set_func_03(void) +{ + Evas_Object *button = NULL; + Evas_Object *test_button = NULL; - button = elm_button_add(tickernoti); + button = elm_button_add(elm_tickernoti_detailview_get(tickernoti)); - elm_tickernoti_detailview_button_set(tickernoti, NULL); - test_button = elm_tickernoti_detailview_button_get(tickernoti); + elm_tickernoti_detailview_button_set(tickernoti, NULL); + test_button = elm_tickernoti_detailview_button_get(tickernoti); - if (test_button) { - tet_infoline("elm_tickernoti_detailview_button_set() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (test_button == button) { + tet_infoline("elm_tickernoti_detailview_button_set() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_get_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_get_func.c index 78c1821..20f1ad6 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_get_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_get_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +39,36 @@ static void utc_UIFW_elm_tickernoti_detailview_get_func_01(void); static void utc_UIFW_elm_tickernoti_detailview_get_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_detailview_get_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_detailview_get_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_detailview_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_detailview_get_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,16 +76,16 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_detailview_get_func_01(void) { - Evas_Object *detailview = NULL; + Evas_Object *detailview = NULL; - detailview = elm_tickernoti_detailview_get(tickernoti); + detailview = elm_tickernoti_detailview_get(tickernoti); - if (!detailview) { - tet_infoline("elm_tickernoti_detailview_get() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (!detailview) { + tet_infoline("elm_tickernoti_detailview_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -94,14 +93,14 @@ static void utc_UIFW_elm_tickernoti_detailview_get_func_01(void) */ static void utc_UIFW_elm_tickernoti_detailview_get_func_02(void) { - Evas_Object *detailview = NULL; + Evas_Object *detailview = NULL; - detailview = elm_tickernoti_detailview_get(NULL); + detailview = elm_tickernoti_detailview_get(NULL); - if (detailview) { - tet_infoline("elm_tickernoti_detailview_get() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (detailview) { + tet_infoline("elm_tickernoti_detailview_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_icon_get_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_icon_get_func.c index 5d34a7b..5130708 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_icon_get_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_icon_get_func.c @@ -1,32 +1,32 @@ #include #include +#define PKG_DATA_DIR "$PREFIX/share/elementary" // Definitions // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +40,36 @@ static void utc_UIFW_elm_tickernoti_detailview_icon_get_func_01(void); static void utc_UIFW_elm_tickernoti_detailview_icon_get_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_detailview_icon_get_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_detailview_icon_get_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_detailview_icon_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_detailview_icon_get_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,20 +77,23 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_detailview_icon_get_func_01(void) { - Evas_Object *icon = NULL; - Evas_Object *test_icon = NULL; - - icon = elm_icon_add(tickernoti); - - elm_tickernoti_detailview_icon_set(tickernoti, icon); - test_icon = elm_tickernoti_detailview_icon_get(tickernoti); - - if (test_icon != icon) { - tet_infoline("elm_tickernoti_detailview_icon_get() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + Evas_Object *icon = NULL; + Evas_Object* ic = NULL; + char buf[PATH_MAX]; + + ic = elm_icon_add(elm_tickernoti_detailview_get(tickernoti)); + snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PKG_DATA_DIR); + elm_icon_file_set(ic, buf, NULL); + + elm_tickernoti_detailview_icon_set(tickernoti, ic); + icon = elm_tickernoti_detailview_icon_get(tickernoti); + + if (ic != icon) { + tet_infoline("elm_tickernoti_detailview_icon_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -98,18 +101,21 @@ static void utc_UIFW_elm_tickernoti_detailview_icon_get_func_01(void) */ static void utc_UIFW_elm_tickernoti_detailview_icon_get_func_02(void) { - Evas_Object *icon = NULL; - Evas_Object *test_icon = NULL; - - icon = elm_icon_add(tickernoti); - - elm_tickernoti_detailview_icon_set(tickernoti, NULL); - test_icon = elm_tickernoti_detailview_icon_get(tickernoti); - - if (test_icon) { - tet_infoline("elm_tickernoti_detailview_icon_get() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + Evas_Object *icon = NULL; + Evas_Object* ic = NULL; + char buf[PATH_MAX]; + + ic = elm_icon_add(elm_tickernoti_detailview_get(tickernoti)); + snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PKG_DATA_DIR); + elm_icon_file_set(ic, buf, NULL); + + elm_tickernoti_detailview_icon_set(tickernoti, ic); + icon = elm_tickernoti_detailview_icon_get(NULL); + + if (icon) { + tet_infoline("elm_tickernoti_detailview_icon_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_icon_set_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_icon_set_func.c index 97476ad..dc187d4 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_icon_set_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_icon_set_func.c @@ -1,29 +1,29 @@ #include #include - +#define PKG_DATA_DIR "$PREFIX/share/elementary" // Definitions // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } @@ -40,36 +40,36 @@ static void utc_UIFW_elm_tickernoti_detailview_icon_set_func_01(void); static void utc_UIFW_elm_tickernoti_detailview_icon_set_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_detailview_icon_set_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_detailview_icon_set_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_detailview_icon_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_detailview_icon_set_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,20 +77,23 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_detailview_icon_set_func_01(void) { - Evas_Object *icon = NULL; - Evas_Object *test_icon = NULL; - - icon = elm_icon_add(tickernoti); - - elm_tickernoti_detailview_icon_set(tickernoti, icon); - test_icon = elm_tickernoti_detailview_icon_get(tickernoti); - - if (test_icon != icon) { - tet_infoline("elm_tickernoti_detailview_icon_set() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + Evas_Object *icon = NULL; + Evas_Object* ic = NULL; + char buf[PATH_MAX]; + + ic = elm_icon_add(elm_tickernoti_detailview_get(tickernoti)); + snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PKG_DATA_DIR); + elm_icon_file_set(ic, buf, NULL); + + elm_tickernoti_detailview_icon_set(tickernoti, ic); + icon = elm_tickernoti_detailview_icon_get(tickernoti); + + if (ic != icon) { + tet_infoline("elm_tickernoti_detailview_icon_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -98,18 +101,16 @@ static void utc_UIFW_elm_tickernoti_detailview_icon_set_func_01(void) */ static void utc_UIFW_elm_tickernoti_detailview_icon_set_func_02(void) { - Evas_Object *icon = NULL; - Evas_Object *test_icon = NULL; + Evas_Object *icon = NULL; + Evas_Object* ic = NULL; + char buf[PATH_MAX]; - icon = elm_icon_add(tickernoti); + ic = elm_icon_add(elm_tickernoti_detailview_get(tickernoti)); + snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PKG_DATA_DIR); + elm_icon_file_set(ic, buf, NULL); - elm_tickernoti_detailview_icon_set(tickernoti, icon); - test_icon = elm_tickernoti_detailview_icon_get(NULL); + elm_tickernoti_detailview_icon_set(NULL, ic); + icon = elm_tickernoti_detailview_icon_get(tickernoti); - if (test_icon) { - tet_infoline("elm_tickernoti_detailview_icon_set() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_label_get_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_label_get_func.c index 3a7e3fa..a995a21 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_label_get_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_label_get_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +39,36 @@ static void utc_UIFW_elm_tickernoti_detailview_label_get_func_01(void); static void utc_UIFW_elm_tickernoti_detailview_label_get_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_detailview_label_get_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_detailview_label_get_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_detailview_label_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_detailview_label_get_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,17 +76,17 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_detailview_label_get_func_01(void) { - const char *text; + const char *text; - elm_tickernoti_detailview_label_set(tickernoti, "Tickernoti"); - text = elm_tickernoti_detailview_label_get(tickernoti); + elm_tickernoti_detailview_label_set(tickernoti, "Tickernoti"); + text = elm_tickernoti_detailview_label_get(tickernoti); - if (strcmp(text, "Tickernoti")) { - tet_infoline("elm_tickernoti_detailview_label_get() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (strcmp(text, "Tickernoti")) { + tet_infoline("elm_tickernoti_detailview_label_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -95,15 +94,15 @@ static void utc_UIFW_elm_tickernoti_detailview_label_get_func_01(void) */ static void utc_UIFW_elm_tickernoti_detailview_label_get_func_02(void) { - const char *text; + const char *text; - elm_tickernoti_detailview_label_set(tickernoti, "Tickernoti"); - text = elm_tickernoti_detailview_label_get(NULL); + elm_tickernoti_detailview_label_set(tickernoti, "Tickernoti"); + text = elm_tickernoti_detailview_label_get(NULL); - if (text) { - tet_infoline("elm_tickernoti_detailview_label_get() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (text) { + tet_infoline("elm_tickernoti_detailview_label_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_label_set_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_label_set_func.c index 434f2f4..b69afcb 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_label_set_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_detailview_label_set_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +39,36 @@ static void utc_UIFW_elm_tickernoti_detailview_label_set_func_01(void); static void utc_UIFW_elm_tickernoti_detailview_label_set_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_detailview_label_set_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_detailview_label_set_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_detailview_label_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_detailview_label_set_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); - - tickernoti = elm_tickernoti_add(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); + + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,17 +76,17 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_detailview_label_set_func_01(void) { - const char *text; + const char *text; - elm_tickernoti_detailview_label_set(tickernoti, "Tickernoti"); - text = elm_tickernoti_detailview_label_get(tickernoti); + elm_tickernoti_detailview_label_set(tickernoti, "Tickernoti"); + text = elm_tickernoti_detailview_label_get(tickernoti); - if (strcmp(text, "Tickernoti")) { - tet_infoline("elm_tickernoti_detailview_label_set() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (strcmp(text, "Tickernoti")) { + tet_infoline("elm_tickernoti_detailview_label_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -95,15 +94,15 @@ static void utc_UIFW_elm_tickernoti_detailview_label_set_func_01(void) */ static void utc_UIFW_elm_tickernoti_detailview_label_set_func_02(void) { - const char *text; + const char *text; - elm_tickernoti_detailview_label_set(tickernoti, NULL); - text = elm_tickernoti_detailview_label_get(tickernoti); + elm_tickernoti_detailview_label_set(tickernoti, NULL); + text = elm_tickernoti_detailview_label_get(tickernoti); - if (strcmp(text, "")) { - tet_infoline("elm_tickernoti_detailview_label_set() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (strcmp(text, "")) { + tet_infoline("elm_tickernoti_detailview_label_set() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_icon_get_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_icon_get_func.c index dd7152b..23a6595 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_icon_get_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_icon_get_func.c @@ -1,32 +1,32 @@ #include #include +#define PKG_DATA_DIR "$PREFIX/share/elementary" // Definitions // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +40,36 @@ static void utc_UIFW_elm_tickernoti_icon_get_func_01(void); static void utc_UIFW_elm_tickernoti_icon_get_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_icon_get_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_icon_get_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_icon_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_icon_get_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(NULL); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,20 +77,24 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_icon_get_func_01(void) { - Evas_Object *icon = NULL; - Evas_Object *test_icon = NULL; - - icon = elm_icon_add(tickernoti); - - elm_tickernoti_icon_set(tickernoti, icon); - test_icon = elm_tickernoti_icon_get(tickernoti); - - if (test_icon != icon) { - tet_infoline("elm_tickernoti_icon_get() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + Evas_Object *icon = NULL; + Evas_Object* ic = NULL; + char buf[PATH_MAX] = {0,}; + + ic = elm_icon_add(tickernoti); + snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PKG_DATA_DIR); + elm_icon_file_set(ic, buf, NULL); + elm_icon_scale_set (ic, 1, 1); + + elm_tickernoti_icon_set(tickernoti, ic); + icon = elm_tickernoti_icon_get(tickernoti); + + if (ic != icon) { + tet_infoline("elm_tickernoti_icon_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -98,18 +102,22 @@ static void utc_UIFW_elm_tickernoti_icon_get_func_01(void) */ static void utc_UIFW_elm_tickernoti_icon_get_func_02(void) { - Evas_Object *icon = NULL; - Evas_Object *test_icon = NULL; - - icon = elm_icon_add(tickernoti); - - elm_tickernoti_icon_set(tickernoti, icon); - test_icon = elm_tickernoti_icon_get(NULL); - - if (test_icon) { - tet_infoline("elm_tickernoti_icon_get() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + Evas_Object *icon = NULL; + Evas_Object* ic = NULL; + char buf[PATH_MAX] = {0,}; + + ic = elm_icon_add(tickernoti); + snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PKG_DATA_DIR); + elm_icon_file_set(ic, buf, NULL); + elm_icon_scale_set (ic, 1, 1); + + elm_tickernoti_icon_set(tickernoti, ic); + icon = elm_tickernoti_icon_get(NULL); + + if (icon) { + tet_infoline("elm_tickernoti_icon_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_icon_set_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_icon_set_func.c index b69f5bd..93e77fa 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_icon_set_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_icon_set_func.c @@ -1,32 +1,32 @@ #include #include +#define PKG_DATA_DIR "$PREFIX/share/elementary" // Definitions // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +40,36 @@ static void utc_UIFW_elm_tickernoti_icon_set_func_01(void); static void utc_UIFW_elm_tickernoti_icon_set_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_icon_set_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_icon_set_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_icon_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_icon_set_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(NULL); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,20 +77,25 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_icon_set_func_01(void) { - Evas_Object *icon = NULL; - Evas_Object *test_icon = NULL; - - icon = elm_icon_add(tickernoti); - - elm_tickernoti_icon_set(tickernoti, icon); - test_icon = elm_tickernoti_icon_get(tickernoti); - - if (test_icon != icon) { - tet_infoline("elm_tickernoti_icon_set() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + char buf[PATH_MAX] = {0,}; + Evas_Object *test_icon = NULL; + + /* icon for tickernoti */ + Evas_Object *icon1; + icon1 = elm_icon_add (tickernoti); + snprintf (buf, sizeof(buf), "%s/00_noti_msg.png", PKG_DATA_DIR); + elm_icon_file_set (icon1, buf, NULL); + elm_icon_scale_set (icon1, 1, 1); + + elm_tickernoti_icon_set (tickernoti, icon1); + test_icon = elm_tickernoti_icon_get(tickernoti); + + if (test_icon != icon1) { + tet_infoline("elm_tickernoti_icon_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -98,18 +103,18 @@ static void utc_UIFW_elm_tickernoti_icon_set_func_01(void) */ static void utc_UIFW_elm_tickernoti_icon_set_func_02(void) { - Evas_Object *icon = NULL; - Evas_Object *test_icon = NULL; + char buf[PATH_MAX] = {0,}; + Evas_Object *test_icon = NULL; - icon = elm_icon_add(tickernoti); + /* icon for tickernoti */ + Evas_Object *icon1; + icon1 = elm_icon_add (tickernoti); + snprintf (buf, sizeof(buf), "%s/00_noti_msg.png", PKG_DATA_DIR); + elm_icon_file_set (icon1, buf, NULL); + elm_icon_scale_set (icon1, 1, 1); - elm_tickernoti_icon_set(tickernoti, NULL); - test_icon = elm_tickernoti_icon_get(tickernoti); + elm_tickernoti_icon_set (NULL, icon1); + test_icon = elm_tickernoti_icon_get(tickernoti); - if (test_icon) { - tet_infoline("elm_tickernoti_icon_set() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_label_set_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_label_set_func.c index 26c7fcf..933e554 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_label_set_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_label_set_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +39,36 @@ static void utc_UIFW_elm_tickernoti_label_set_func_01(void); static void utc_UIFW_elm_tickernoti_label_set_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_label_set_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_label_set_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_label_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_label_set_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,17 +76,17 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_label_set_func_01(void) { - const char *text; + const char *text; - elm_tickernoti_label_set(tickernoti, "Tickernoti"); - text = elm_tickernoti_label_get(tickernoti); + elm_tickernoti_label_set(tickernoti, "Tickernoti"); + text = elm_tickernoti_label_get(tickernoti); - if (strcmp(text, "Tickernoti")) { - tet_infoline("elm_tickernoti_label_set() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (strcmp(text, "Tickernoti")) { + tet_infoline("elm_tickernoti_label_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -95,15 +94,15 @@ static void utc_UIFW_elm_tickernoti_label_set_func_01(void) */ static void utc_UIFW_elm_tickernoti_label_set_func_02(void) { - const char *text; + const char *text; - elm_tickernoti_label_set(tickernoti, NULL); - text = elm_tickernoti_label_get(tickernoti); + elm_tickernoti_label_set(tickernoti, NULL); + text = elm_tickernoti_label_get(tickernoti); - if (strcmp(text, "")) { - tet_infoline("elm_tickernoti_label_set() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (strcmp(text, "")) { + tet_infoline("elm_tickernoti_label_set() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_mode_get_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_mode_get_func.c index e7f1fd3..b5b1366 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_mode_get_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_mode_get_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +39,36 @@ static void utc_UIFW_elm_tickernoti_mode_get_func_01(void); static void utc_UIFW_elm_tickernoti_mode_get_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_mode_get_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_mode_get_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_mode_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_mode_get_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,17 +76,17 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_mode_get_func_01(void) { - Elm_Tickernoti_Mode mode = ELM_TICKERNOTI_DEFAULT; + Elm_Tickernoti_Mode mode = ELM_TICKERNOTI_DEFAULT; - elm_tickernoti_mode_set(tickernoti, ELM_TICKERNOTI_DETAILVIEW); - mode = elm_tickernoti_mode_get(tickernoti); + elm_tickernoti_mode_set(tickernoti, ELM_TICKERNOTI_DETAILVIEW); + mode = elm_tickernoti_mode_get(tickernoti); - if (mode != ELM_TICKERNOTI_DETAILVIEW) { - tet_infoline("elm_tickernoti_mode_get() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (mode != ELM_TICKERNOTI_DETAILVIEW) { + tet_infoline("elm_tickernoti_mode_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -95,15 +94,15 @@ static void utc_UIFW_elm_tickernoti_mode_get_func_01(void) */ static void utc_UIFW_elm_tickernoti_mode_get_func_02(void) { - Elm_Tickernoti_Mode mode = 100; + Elm_Tickernoti_Mode mode = 100; - elm_tickernoti_mode_set(tickernoti, ELM_TICKERNOTI_DEFAULT); - mode = elm_tickernoti_mode_get(NULL); + elm_tickernoti_mode_set(tickernoti, ELM_TICKERNOTI_DEFAULT); + mode = elm_tickernoti_mode_get(NULL); - if (mode = ELM_TICKERNOTI_DEFAULT) { - tet_infoline("elm_tickernoti_mode_get() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (mode == ELM_TICKERNOTI_DEFAULT) { + tet_infoline("elm_tickernoti_mode_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_mode_set_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_mode_set_func.c index fa7b644..db73b2c 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_mode_set_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_mode_set_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +39,36 @@ static void utc_UIFW_elm_tickernoti_mode_set_func_01(void); static void utc_UIFW_elm_tickernoti_mode_set_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_mode_set_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_mode_set_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_mode_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_mode_set_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,17 +76,17 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_mode_set_func_01(void) { - Elm_Tickernoti_Mode mode = ELM_TICKERNOTI_DEFAULT; + Elm_Tickernoti_Mode mode = ELM_TICKERNOTI_DEFAULT; - elm_tickernoti_mode_set(tickernoti, ELM_TICKERNOTI_DETAILVIEW); - mode = elm_tickernoti_mode_get(tickernoti); + elm_tickernoti_mode_set(tickernoti, ELM_TICKERNOTI_DETAILVIEW); + mode = elm_tickernoti_mode_get(tickernoti); - if (mode != ELM_TICKERNOTI_DETAILVIEW) { - tet_infoline("elm_tickernoti_mode_set() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (mode != ELM_TICKERNOTI_DETAILVIEW) { + tet_infoline("elm_tickernoti_mode_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } +tet_result(TET_PASS); } /** @@ -95,19 +94,16 @@ static void utc_UIFW_elm_tickernoti_mode_set_func_01(void) */ static void utc_UIFW_elm_tickernoti_mode_set_func_02(void) { - Elm_Tickernoti_Mode mode = ELM_TICKERNOTI_DETAILVIEW; - - elm_tickernoti_mode_set(tickernoti, ELM_TICKERNOTI_DEFAULT); - elm_tickernoti_mode_set(tickernoti, 100); - mode = elm_tickernoti_mode_get(tickernoti); - - printf("\n\n\nmode :: %d\n\n\n", mode); - printf("\n\n\n%d\n\n\n", ELM_TICKERNOTI_DEFAULT); - - if (mode != ELM_TICKERNOTI_DEFAULT) { - tet_infoline("elm_tickernoti_mode_set() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + Elm_Tickernoti_Mode mode = ELM_TICKERNOTI_DETAILVIEW; + + elm_tickernoti_mode_set(tickernoti, ELM_TICKERNOTI_DEFAULT); + elm_tickernoti_mode_set(tickernoti, 100); + mode = elm_tickernoti_mode_get(tickernoti); + + if (mode != ELM_TICKERNOTI_DEFAULT) { + tet_infoline("elm_tickernoti_mode_set() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } diff --git a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_rotation_set_func.c b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_rotation_set_func.c index 3f53362..a8aca28 100644 --- a/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_rotation_set_func.c +++ b/TC/elm_ts/tickernoti/utc_UIFW_elm_tickernoti_rotation_set_func.c @@ -5,28 +5,27 @@ // For checking the result of the positive test case. #define TET_CHECK_PASS(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err == (x1)) \ - { \ - tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } // For checking the result of the negative test case. #define TET_CHECK_FAIL(x1, y...) \ { \ - Evas_Object *err = y; \ - if (err != (x1)) \ - { \ - tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ - tet_result(TET_FAIL); \ - return; \ - } \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ } - Evas_Object *main_win; Evas_Object *tickernoti; @@ -40,36 +39,36 @@ static void utc_UIFW_elm_tickernoti_rotation_set_func_01(void); static void utc_UIFW_elm_tickernoti_rotation_set_func_02(void); enum { - POSITIVE_TC_IDX = 0x01, - NEGATIVE_TC_IDX, + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, }; struct tet_testlist tet_testlist[] = { - { utc_UIFW_elm_tickernoti_rotation_set_func_01, POSITIVE_TC_IDX }, - { utc_UIFW_elm_tickernoti_rotation_set_func_02, NEGATIVE_TC_IDX }, - { NULL, 0 } + { utc_UIFW_elm_tickernoti_rotation_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_tickernoti_rotation_set_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } }; static void startup(void) { - tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); - elm_init(0, NULL); - main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); - evas_object_show(main_win); + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); - tickernoti = elm_tickernoti_add(main_win); + tickernoti = elm_tickernoti_add(main_win); } static void cleanup(void) { - if ( NULL != main_win ) { - evas_object_del(main_win); - main_win = NULL; - } - elm_shutdown(); - tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); - - evas_object_del(tickernoti); + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); + + evas_object_del(tickernoti); } /** @@ -77,17 +76,17 @@ static void cleanup(void) */ static void utc_UIFW_elm_tickernoti_rotation_set_func_01(void) { - int angle = 0; + int angle = 0; - elm_tickernoti_rotation_set(tickernoti, 90); - angle = elm_tickernoti_rotation_get(tickernoti); + elm_tickernoti_rotation_set(tickernoti, 90); + angle = elm_tickernoti_rotation_get(tickernoti); - if (angle != 90) { - tet_infoline("elm_tickernoti_rotation_set() failed in positive test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + if (angle != 90) { + tet_infoline("elm_tickernoti_rotation_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); } /** @@ -95,15 +94,10 @@ static void utc_UIFW_elm_tickernoti_rotation_set_func_01(void) */ static void utc_UIFW_elm_tickernoti_rotation_set_func_02(void) { - int angle = 0; + int angle = 0; - elm_tickernoti_rotation_set(tickernoti, NULL); - angle = elm_tickernoti_rotation_get(tickernoti); + elm_tickernoti_rotation_set(NULL, 0); + angle = elm_tickernoti_rotation_get(tickernoti); - if (angle != 0) { - tet_infoline("elm_tickernoti_rotation_set() failed in negative test case"); - tet_result(TET_FAIL); - return; - } - tet_result(TET_PASS); + tet_result(TET_PASS); } -- 2.7.4