2 #include <Elementary.h>
3 #define ICON_DIR "usr/share/beat_winset_test/icon"
7 // For checking the result of the positive test case.
8 #define TET_CHECK_PASS(x1, y...) \
10 Evas_Object *err = y; \
13 tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
14 tet_result(TET_FAIL); \
19 // For checking the result of the negative test case.
20 #define TET_CHECK_FAIL(x1, y...) \
22 Evas_Object *err = y; \
25 tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
26 tet_result(TET_FAIL); \
32 Evas_Object *main_win, *navibar;
36 static void startup(void);
37 static void cleanup(void);
39 void (*tet_startup)(void) = startup;
40 void (*tet_cleanup)(void) = cleanup;
42 static void utc_UIFW_elm_navigationbar_content_bottom_get_func_01(void);
43 static void utc_UIFW_elm_navigationbar_content_bottom_get_func_02(void);
46 POSITIVE_TC_IDX = 0x01,
50 struct tet_testlist tet_testlist[] = {
51 { utc_UIFW_elm_navigationbar_content_bottom_get_func_01, POSITIVE_TC_IDX },
52 { utc_UIFW_elm_navigationbar_content_bottom_get_func_02, NEGATIVE_TC_IDX },
56 static void startup(void)
58 tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
60 main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
61 evas_object_show(main_win);
62 navibar = elm_navigationbar_add(main_win);
63 evas_object_show(navibar);
66 static void cleanup(void)
68 if ( NULL != navibar ) {
69 evas_object_del(navibar);
72 if ( NULL != main_win ) {
73 evas_object_del(main_win);
77 tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
81 * @brief Positive test case of elm_navigationbar_content_bottom_get()
83 static void utc_UIFW_elm_navigationbar_content_bottom_get_func_01(void)
85 Evas_Object *content = elm_icon_add(navibar);
86 snprintf(buf, sizeof(buf), "%s/00_volume_icon.png", ICON_DIR);
87 elm_icon_file_set(content, buf, NULL);
88 evas_object_size_hint_aspect_set(content, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
89 elm_icon_scale_set(content, 1, 1);
91 elm_navigationbar_push(navibar, "title", NULL, NULL, NULL, content);
92 Evas_Object *btm = elm_navigationbar_content_bottom_get(navibar);
95 tet_infoline("elm_navigationbar_content_bottom_get() failed in positive test case");
103 * @brief Negative test case of ug_init elm_navigationbar_content_bottom_get()
105 static void utc_UIFW_elm_navigationbar_content_bottom_get_func_02(void)
107 Evas_Object *btm = elm_navigationbar_content_bottom_get(NULL);
109 tet_infoline("elm_navigationbar_content_bottom_get() failed in negative test case");
110 tet_result(TET_FAIL);
113 tet_result(TET_PASS);