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); \
30 Evas_Object *main_win, *progressbar;
33 static void startup(void);
34 static void cleanup(void);
36 void (*tet_startup)(void) = startup;
37 void (*tet_cleanup)(void) = cleanup;
39 static void utc_UIFW_elm_progressbar_icon_get_func_01(void);
40 static void utc_UIFW_elm_progressbar_icon_get_func_02(void);
43 POSITIVE_TC_IDX = 0x01,
47 struct tet_testlist tet_testlist[] = {
48 { utc_UIFW_elm_progressbar_icon_get_func_01, POSITIVE_TC_IDX },
49 { utc_UIFW_elm_progressbar_icon_get_func_02, NEGATIVE_TC_IDX },
53 static void startup(void)
55 tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
57 main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
58 evas_object_show(main_win);
60 progressbar = elm_progressbar_add(main_win);
61 evas_object_show(progressbar);
62 elm_win_resize_object_add(main_win, progressbar);
63 evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, EVAS_HINT_FILL);
64 evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
67 static void cleanup(void)
69 if ( NULL != progressbar ) {
70 evas_object_del(progressbar);
74 if ( NULL != main_win ) {
75 evas_object_del(main_win);
79 tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
83 * @brief Positive test case of elm_progressbar_icon_get()
85 static void utc_UIFW_elm_progressbar_icon_get_func_01(void)
87 Evas_Object *icon, *res;
89 tet_infoline("[[ DEBUG :: Positive ]]");
91 icon = elm_icon_add(main_win);
92 elm_icon_file_set(icon, "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg", NULL);
93 evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 0);
94 evas_object_size_hint_min_set(icon, 10, 10);
95 elm_progressbar_icon_set(progressbar, icon);
97 res = elm_progressbar_icon_get(progressbar);
99 tet_infoline("elm_progressbar_icon_get() failed in positive test case");
100 tet_result(TET_FAIL);
104 tet_result(TET_PASS);
105 tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_progressbar_icon_get().");
109 * @brief Negative test case of ug_init elm_progressbar_icon_get()
111 static void utc_UIFW_elm_progressbar_icon_get_func_02(void)
113 Evas_Object *icon, *res;
115 tet_infoline("[[ DEBUG:: Negative ]]");
117 icon = elm_icon_add(main_win);
118 elm_icon_file_set(icon, "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg", NULL);
119 evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 0);
120 evas_object_size_hint_min_set(icon, 10, 10);
121 elm_progressbar_icon_set(progressbar, icon);
123 res = elm_progressbar_icon_get(NULL);
125 tet_infoline("elm_progressbar_icon_get() failed in negative test case");
126 tet_result(TET_FAIL);
130 tet_result(TET_PASS);
131 tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, elm_progressbar_icon_get().");