[controlbar] add TC
authorJeahwan Kim <jae.hwan.kim@samsung.com>
Fri, 29 Oct 2010 05:08:04 +0000 (14:08 +0900)
committerJeahwan Kim <jae.hwan.kim@samsung.com>
Fri, 29 Oct 2010 05:08:04 +0000 (14:08 +0900)
14 files changed:
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_first_item_get_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_del_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_disable_set_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_icon_get_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_label_get_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_label_set_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_next_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_prev_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_select_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_visible_get_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_visible_set_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_items_get_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_last_item_get_func.c [new file with mode: 0644]
TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_selected_item_get_func.c [new file with mode: 0644]

diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_first_item_get_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_first_item_get_func.c
new file mode 100644 (file)
index 0000000..98e473c
--- /dev/null
@@ -0,0 +1,110 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_first_item_get_func_01(void);
+static void utc_UIFW_elm_controlbar_first_item_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_first_item_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_first_item_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", NULL);
+       elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar2", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_first_item_get()
+ */
+static void utc_UIFW_elm_controlbar_first_item_get_func_01(void)
+{
+       Elm_Controlbar_Item *item = NULL;
+
+       item = elm_controlbar_first_item_get(controlbar);
+       
+       if (item != item1) {
+               tet_infoline("elm_controlbar_first_item_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_first_item_get()
+ */
+static void utc_UIFW_elm_controlbar_first_item_get_func_02(void)
+{
+       Elm_Controlbar_Item *item = NULL;
+
+       item = elm_controlbar_first_item_get(NULL);
+
+       if (item) {
+               tet_infoline("elm_controlbar_first_item_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_del_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_del_func.c
new file mode 100644 (file)
index 0000000..fc2fa05
--- /dev/null
@@ -0,0 +1,123 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Evas_Object *button;
+Elm_Controlbar_Item *item1;
+Elm_Controlbar_Item *item2;
+Elm_Controlbar_Item *item3;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_del_func_01(void);
+static void utc_UIFW_elm_controlbar_item_del_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_del_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_del_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", NULL); 
+       item2 = elm_controlbar_tool_item_append(controlbar, NULL, "Controlbar", NULL, NULL); 
+       button = elm_button_add(controlbar);
+       elm_button_label_set(button, "button");
+       item3 = elm_controlbar_object_item_append(controlbar, button, 3); 
+}
+
+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(controlbar);
+       evas_object_del(button);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_del()
+ */
+static void utc_UIFW_elm_controlbar_item_del_func_01(void)
+{
+       elm_controlbar_item_del(item1);
+       if (item1) {
+               tet_infoline("elm_controlbar_item_del() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       elm_controlbar_item_del(item2);
+       if (item2) {
+               tet_infoline("elm_controlbar_item_del() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       elm_controlbar_item_del(item3);
+       if (item3) {
+               tet_infoline("elm_controlbar_item_del() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_del()
+ */
+static void utc_UIFW_elm_controlbar_item_del_func_02(void)
+{
+       elm_controlbar_item_del(NULL);
+       if (!item1 || !item2 || !item3) {
+               tet_infoline("elm_controlbar_item_del() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_disable_set_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_disable_set_func.c
new file mode 100644 (file)
index 0000000..67c69f0
--- /dev/null
@@ -0,0 +1,96 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_disable_set_func_01(void);
+static void utc_UIFW_elm_controlbar_item_disable_set_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_disable_set_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_disable_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_disable_set()
+ */
+static void utc_UIFW_elm_controlbar_item_disable_set_func_01(void)
+{
+       elm_controlbar_item_disable_set(item1, EINA_TRUE);
+
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_disable_set()
+ */
+static void utc_UIFW_elm_controlbar_item_disable_set_func_02(void)
+{
+       elm_controlbar_item_disable_set(NULL, EINA_TRUE);
+
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_icon_get_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_icon_get_func.c
new file mode 100644 (file)
index 0000000..eaf1416
--- /dev/null
@@ -0,0 +1,109 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_icon_get_func_01(void);
+static void utc_UIFW_elm_controlbar_item_icon_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_icon_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Controlbar", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_icon_get()
+ */
+static void utc_UIFW_elm_controlbar_item_icon_get_func_01(void)
+{
+       Evas_Object *icon = NULL;
+
+       icon = elm_controlbar_item_icon_get(item1);
+       
+       if (!icon) {
+               tet_infoline("elm_controlbar_item_icon_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_icon_get()
+ */
+static void utc_UIFW_elm_controlbar_item_icon_get_func_02(void)
+{
+       Evas_Object *icon = NULL;
+
+       icon = elm_controlbar_item_icon_get(NULL);
+
+       if (icon) {
+               tet_infoline("elm_controlbar_item_icon_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_label_get_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_label_get_func.c
new file mode 100644 (file)
index 0000000..eb39736
--- /dev/null
@@ -0,0 +1,111 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_label_get_func_01(void);
+static void utc_UIFW_elm_controlbar_item_label_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_label_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_label_get()
+ */
+static void utc_UIFW_elm_controlbar_item_label_get_func_01(void)
+{
+       char *label = NULL;
+
+
+       label = elm_controlbar_item_label_get(item1);
+
+       if (strcmp(label, "Controlbar")) {
+               tet_infoline("elm_controlbar_item_label_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_label_get()
+ */
+static void utc_UIFW_elm_controlbar_item_label_get_func_02(void)
+{
+       char *label = NULL;
+
+
+       label = elm_controlbar_item_label_get(NULL);
+
+       if (label) {
+               tet_infoline("elm_controlbar_item_label_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_label_set_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_label_set_func.c
new file mode 100644 (file)
index 0000000..6cde4a6
--- /dev/null
@@ -0,0 +1,111 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_label_set_func_01(void);
+static void utc_UIFW_elm_controlbar_item_label_set_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_label_set_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_label_set()
+ */
+static void utc_UIFW_elm_controlbar_item_label_set_func_01(void)
+{
+       char *label = NULL;
+
+       elm_controlbar_item_label_set(item1, "Success");
+       label = elm_controlbar_item_label_set(item1);
+
+       if (strcmp(label, "Success")) {
+               tet_infoline("elm_controlbar_item_label_set() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_label_set()
+ */
+static void utc_UIFW_elm_controlbar_item_label_set_func_02(void)
+{
+       char *label = NULL;
+
+       elm_controlbar_item_label_set(NULL, "Fail");
+       label = elm_controlbar_item_label_get(item1);
+
+       if (strcmp(label, "Fail")) {
+               tet_infoline("elm_controlbar_item_label_set() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_next_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_next_func.c
new file mode 100644 (file)
index 0000000..a49269f
--- /dev/null
@@ -0,0 +1,111 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+Elm_Controlbar_Item *item2;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_next_func_01(void);
+static void utc_UIFW_elm_controlbar_item_next_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_next_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_next_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", NULL);
+       item2 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar2", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_next()
+ */
+static void utc_UIFW_elm_controlbar_item_next_func_01(void)
+{
+       Elm_Controlbar_Item *item;
+
+       item = elm_controlbar_item_next(item1);
+
+       if (item != item2) {
+               tet_infoline("elm_controlbar_item_next() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_next()
+ */
+static void utc_UIFW_elm_controlbar_item_next_func_02(void)
+{
+       Elm_Controlbar_Item *item;
+
+       item = elm_controlbar_item_next(NULL);
+
+       if (item) {
+               tet_infoline("elm_controlbar_item_next() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_prev_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_prev_func.c
new file mode 100644 (file)
index 0000000..2828a3c
--- /dev/null
@@ -0,0 +1,111 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+Elm_Controlbar_Item *item2;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_prev_func_01(void);
+static void utc_UIFW_elm_controlbar_item_prev_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_prev_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_prev_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", NULL);
+       item2 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar2", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_prev()
+ */
+static void utc_UIFW_elm_controlbar_item_prev_func_01(void)
+{
+       Elm_Controlbar_Item *item;
+
+       item = elm_controlbar_item_prev(item2);
+
+       if (item != item1) {
+               tet_infoline("elm_controlbar_item_prev() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_prev()
+ */
+static void utc_UIFW_elm_controlbar_item_prev_func_02(void)
+{
+       Elm_Controlbar_Item *item;
+
+       item = elm_controlbar_item_prev(NULL);
+       
+       if (item) {
+               tet_infoline("elm_controlbar_item_prev() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_select_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_select_func.c
new file mode 100644 (file)
index 0000000..fbb8000
--- /dev/null
@@ -0,0 +1,129 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Evas_Object *button;
+Elm_Controlbar_Item *item1;
+Elm_Controlbar_Item *item2;
+Elm_Controlbar_Item *item3;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_select_func_01(void);
+static void utc_UIFW_elm_controlbar_item_select_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_select_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_select_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", NULL); 
+       item2 = elm_controlbar_tool_item_append(controlbar, NULL, "Controlbar", NULL, NULL); 
+       button = elm_button_add(controlbar);
+       elm_button_label_set(button, "button");
+       item3 = elm_controlbar_object_item_append(controlbar, button, 3); 
+}
+
+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(controlbar);
+       evas_object_del(button);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_select()
+ */
+static void utc_UIFW_elm_controlbar_item_select_func_01(void)
+{
+       Elm_Controlbar_Item *item;
+
+       elm_controlbar_item_select(item1);
+       item = elm_controlbar_selected_item_get(controlbar);
+
+       if (item != item1) {
+               tet_infoline("elm_controlbar_item_select() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_select()
+ */
+static void utc_UIFW_elm_controlbar_item_select_func_02(void)
+{
+       Elm_Controlbar_Item *item;
+
+       elm_controlbar_item_select(item2);
+       item = elm_controlbar_selected_item_get(controlbar);
+
+       if (item == item2) {
+               tet_infoline("elm_controlbar_item_select() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+
+       elm_controlbar_item_select(item3);
+       item = elm_controlbar_selected_item_get(controlbar);
+
+       if (item == item3) {
+               tet_infoline("elm_controlbar_item_select() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_visible_get_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_visible_get_func.c
new file mode 100644 (file)
index 0000000..238d24d
--- /dev/null
@@ -0,0 +1,113 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_visible_get_func_01(void);
+static void utc_UIFW_elm_controlbar_item_visible_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_visible_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_visible_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_visible_get()
+ */
+static void utc_UIFW_elm_controlbar_item_visible_get_func_01(void)
+{
+       Eina_Bool r;
+
+       elm_controlbar_item_visible_set(item1, EINA_TRUE);
+
+       r = elm_controlbar_item_visible_get(item1);
+
+       if (r != EINA_TRUE) {
+               tet_infoline("elm_controlbar_item_visible_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_visible_get()
+ */
+static void utc_UIFW_elm_controlbar_item_visible_get_func_02(void)
+{
+       Eina_Bool r;
+
+       elm_controlbar_item_visible_set(item1, EINA_TRUE);
+
+       r = elm_controlbar_item_visible_get(NULL);
+       
+       if (r == EINA_TRUE) {
+               tet_infoline("elm_controlbar_item_visible_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_visible_set_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_item_visible_set_func.c
new file mode 100644 (file)
index 0000000..bcfa5cc
--- /dev/null
@@ -0,0 +1,95 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_item_visible_set_func_01(void);
+static void utc_UIFW_elm_controlbar_item_visible_set_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_item_visible_set_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_item_visible_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);     
+       
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_item_visible_set()
+ */
+static void utc_UIFW_elm_controlbar_item_visible_set_func_01(void)
+{
+       elm_controlbar_item_visible_set(item1, EINA_TRUE);
+       
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_item_visible_set()
+ */
+static void utc_UIFW_elm_controlbar_item_visible_set_func_02(void)
+{
+       elm_controlbar_item_visible_set(NULL, EINA_TRUE);
+
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_items_get_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_items_get_func.c
new file mode 100644 (file)
index 0000000..43aba77
--- /dev/null
@@ -0,0 +1,119 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+Elm_Controlbar_Item *item2;
+Elm_Controlbar_Item *item3;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_items_get_func_01(void);
+static void utc_UIFW_elm_controlbar_items_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_items_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_items_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", NULL);
+       item2 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar2", NULL);
+       item3 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar3", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_items_get()
+ */
+static void utc_UIFW_elm_controlbar_items_get_func_01(void)
+{
+       Eina_List *items;
+       const Eina_List *l;
+       Elm_Controlbar_Item *item;
+
+       items = elm_controlbar_items_get(controlbar);
+
+       EINA_LIST_FOREACH(items, l, item){
+               if (item != item1 && item != item2 && item != item3) {
+                       tet_infoline("elm_controlbar_items_get() failed in positive test case");
+                       tet_result(TET_FAIL);
+                       return;
+               }
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_items_get()
+ */
+static void utc_UIFW_elm_controlbar_items_get_func_02(void)
+{
+       Eina_List *items;
+       const Eina_List *l;
+       Elm_Controlbar_Item *item;
+
+       items = elm_controlbar_items_get(NULL);
+
+       if (items) {
+               tet_infoline("elm_controlbar_items_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_last_item_get_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_last_item_get_func.c
new file mode 100644 (file)
index 0000000..eeef887
--- /dev/null
@@ -0,0 +1,110 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_last_item_get_func_01(void);
+static void utc_UIFW_elm_controlbar_last_item_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_last_item_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_last_item_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", NULL);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar2", 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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_last_item_get()
+ */
+static void utc_UIFW_elm_controlbar_last_item_get_func_01(void)
+{
+       Elm_Controlbar_Item *item = NULL;
+
+       item = elm_controlbar_last_item_get(controlbar);
+       
+       if (item != item1) {
+               tet_infoline("elm_controlbar_last_item_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_last_item_get()
+ */
+static void utc_UIFW_elm_controlbar_last_item_get_func_02(void)
+{
+       Elm_Controlbar_Item *item = NULL;
+
+       item = elm_controlbar_last_item_get(NULL);
+
+       if (item) {
+               tet_infoline("elm_controlbar_last_item_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_selected_item_get_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_selected_item_get_func.c
new file mode 100644 (file)
index 0000000..7ddc205
--- /dev/null
@@ -0,0 +1,111 @@
+#include <tet_api.h>
+#include <Elementary.h>
+
+// 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; \
+               } \
+}
+
+// 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 *main_win;
+Evas_Object *controlbar;
+Elm_Controlbar_Item *item1;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_controlbar_selected_item_get_func_01(void);
+static void utc_UIFW_elm_controlbar_selected_item_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_controlbar_selected_item_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_controlbar_selected_item_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);     
+
+       controlbar = elm_controlbar_add(main_win);
+       item1 = elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar", NULL);
+       elm_controlbar_tab_item_append(controlbar, NULL, "Controlbar2", NULL);
+       elm_controlbar_item_select(item1);
+}
+
+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(controlbar);
+}
+
+/**
+ * @brief Positive test case of elm_controlbar_selected_item_get()
+ */
+static void utc_UIFW_elm_controlbar_selected_item_get_func_01(void)
+{
+       Elm_Controlbar_Item *item = NULL;
+
+       item = elm_controlbar_selected_item_get(controlbar);
+
+       if (item != item1) {
+               tet_infoline("elm_controlbar_selected_item_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_controlbar_selected_item_get()
+ */
+static void utc_UIFW_elm_controlbar_selected_item_get_func_02(void)
+{
+       Elm_Controlbar_Item *item = NULL;
+
+       item = elm_controlbar_selected_item_get(controlbar);
+
+       if (item) {
+               tet_infoline("elm_controlbar_selected_item_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}