2 #include <Elementary.h>
\r
5 // For checking the result of the positive test case.
\r
6 #define TET_CHECK_PASS(x1, y...) \
\r
8 Evas_Object *err = y; \
\r
11 tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
\r
12 tet_result(TET_FAIL); \
\r
17 // For checking the result of the negative test case.
\r
18 #define TET_CHECK_FAIL(x1, y...) \
\r
20 Evas_Object *err = y; \
\r
23 tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \
\r
24 tet_result(TET_FAIL); \
\r
29 Evas_Object *main_win, *segment_control;
\r
31 static void startup(void);
\r
32 static void cleanup(void);
\r
34 void (*tet_startup)(void) = startup;
\r
35 void (*tet_cleanup)(void) = cleanup;
\r
37 static void utc_UIFW_elm_segment_control_item_object_get_func_01(void);
\r
38 static void utc_UIFW_elm_segment_control_item_object_get_func_02(void);
\r
41 POSITIVE_TC_IDX = 0x01,
\r
45 struct tet_testlist tet_testlist[] = {
\r
46 { utc_UIFW_elm_segment_control_item_object_get_func_01, POSITIVE_TC_IDX },
\r
47 { utc_UIFW_elm_segment_control_item_object_get_func_02, NEGATIVE_TC_IDX },
\r
51 static void startup(void)
\r
53 tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");
\r
55 main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
\r
56 evas_object_show(main_win);
\r
57 segment_control = elm_segment_control_add(main_win);
\r
58 evas_object_show(segment_control);
\r
61 static void cleanup(void)
\r
63 if ( NULL != main_win ) {
\r
64 evas_object_del(main_win);
\r
67 if ( NULL != segment_control ) {
\r
68 evas_object_del(segment_control);
\r
69 segment_control = NULL;
\r
72 tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
\r
76 * @brief Positive test case of elm_segment_control_item_object_get()
\r
78 static void utc_UIFW_elm_segment_control_item_object_get_func_01(void)
\r
80 Elm_Object_Item *item = NULL;
\r
81 Evas_Object *it = NULL;
\r
82 Evas_Object *segment = NULL;
\r
83 segment = elm_segment_control_add(main_win);
\r
84 evas_object_show(segment);
\r
85 item = elm_segment_control_item_add(segment, NULL, "All");
\r
86 it = elm_segment_control_item_object_get(item);
\r
88 tet_infoline("elm_segment_control_item_object_get() failed in positive test case");
\r
89 tet_result(TET_FAIL);
\r
92 tet_result(TET_PASS);
\r
96 * @brief Negative test case of ug_init elm_segment_control_item_object_get()
\r
98 static void utc_UIFW_elm_segment_control_item_object_get_func_02(void)
\r
100 Elm_Object_Item *item = NULL;
\r
101 Evas_Object *it = NULL;
\r
102 Evas_Object *segment = NULL;
\r
103 segment = elm_segment_control_add(main_win);
\r
104 evas_object_show(segment);
\r
105 item = elm_segment_control_item_add(segment, NULL, "All");
\r
106 it = elm_segment_control_item_object_get(NULL);
\r
108 tet_infoline("elm_segment_control_item_object_get() failed in negative test case");
\r
109 tet_result(TET_FAIL);
\r
112 tet_result(TET_PASS);
\r