2 #include <Elementary.h>
5 // For checking the result of the positive test case.
6 #define TET_CHECK_PASS(x1, y...) \
8 Evas_Object *err = y; \
11 tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
12 tet_result(TET_FAIL); \
17 // For checking the result of the negative test case.
18 #define TET_CHECK_FAIL(x1, y...) \
20 Evas_Object *err = y; \
23 tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
24 tet_result(TET_FAIL); \
29 Evas_Object *main_win, *stackedicon;
31 static char *icon_path[] = {
32 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
33 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
34 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
35 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
36 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
37 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
38 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
39 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
40 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
41 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
42 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
43 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
44 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
45 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
46 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
47 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
48 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
49 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
50 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
51 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
52 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
53 "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
56 static void startup(void);
57 static void cleanup(void);
59 void (*tet_startup)(void) = startup;
60 void (*tet_cleanup)(void) = cleanup;
62 static void utc_UIFW_elm_stackedicon_item_prepend_func_01(void);
63 static void utc_UIFW_elm_stackedicon_item_prepend_func_02(void);
66 POSITIVE_TC_IDX = 0x01,
70 struct tet_testlist tet_testlist[] = {
71 { utc_UIFW_elm_stackedicon_item_prepend_func_01, POSITIVE_TC_IDX },
72 { utc_UIFW_elm_stackedicon_item_prepend_func_02, NEGATIVE_TC_IDX },
76 static void startup(void)
78 tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
80 main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
81 evas_object_show(main_win);
83 stackedicon = elm_stackedicon_add(main_win);
84 evas_object_show(stackedicon);
85 elm_win_resize_object_add(main_win, stackedicon);
86 evas_object_size_hint_align_set(stackedicon, EVAS_HINT_FILL, EVAS_HINT_FILL);
87 evas_object_size_hint_weight_set(stackedicon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
90 static void cleanup(void)
92 if ( NULL != stackedicon ) {
93 evas_object_del(stackedicon);
97 if ( NULL != main_win ) {
98 evas_object_del(main_win);
102 tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
106 * @brief Positive test case of elm_stackedicon_item_prepend()
108 static void utc_UIFW_elm_stackedicon_item_prepend_func_01(void)
110 Elm_Stackedicon_Item *it = NULL;
112 tet_infoline("[[ DEBUG :: Positive ]]");
114 it = elm_stackedicon_item_prepend(stackedicon, icon_path[0]);
116 tet_infoline("elm_stackedicon_item_prepend() failed in positive test case");
117 tet_result(TET_FAIL);
120 tet_result(TET_PASS);
121 tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_stackedicon_item_prepend().");
125 * @brief Negative test case of ug_init elm_stackedicon_item_prepend()
127 static void utc_UIFW_elm_stackedicon_item_prepend_func_02(void)
129 Elm_Imageslider_Item *it = NULL;
131 tet_infoline("[[ DEBUG:: Negative ]]");
133 it = elm_stackedicon_item_prepend(NULL, icon_path[1]);
135 tet_infoline("elm_stackedicon_item_prepend() failed in negative test case");
136 tet_result(TET_FAIL);
139 tet_result(TET_PASS);
140 tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, elm_stackedicon_item_prepend().");