[stackedicon] TC added
authorHyunsil <hyunsil.park@samsung.com>
Tue, 2 Nov 2010 02:37:51 +0000 (11:37 +0900)
committerHyunsil <hyunsil.park@samsung.com>
Tue, 2 Nov 2010 02:37:51 +0000 (11:37 +0900)
TC/elm_ts/stackedicon/tc_gen.sh [new file with mode: 0755]
TC/elm_ts/stackedicon/tet_captured [new file with mode: 0644]
TC/elm_ts/stackedicon/tslist [new file with mode: 0644]
TC/elm_ts/stackedicon/utc_MODULE_API_func.c.in [new file with mode: 0755]
TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_add_func.c [new file with mode: 0755]
TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_append_func.c [new file with mode: 0755]
TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_del_func.c [new file with mode: 0755]
TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_list_get_func.c [new file with mode: 0755]
TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_prepend_func.c [new file with mode: 0755]

diff --git a/TC/elm_ts/stackedicon/tc_gen.sh b/TC/elm_ts/stackedicon/tc_gen.sh
new file mode 100755 (executable)
index 0000000..a55200a
--- /dev/null
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+TMPSTR=$0
+SCRIPT=${TMPSTR##*/}
+
+if [ $# -lt 3 ]; then
+       echo "Usage) $SCRIPT module_name winset_name api_name"
+       exit 1
+fi
+
+MODULE=$1
+WINSET=$2
+API=$3
+TEMPLATE=utc_MODULE_API_func.c.in
+TESTCASE=utc_${MODULE}_${API}_func
+
+sed -e '
+       s^@API@^'"$API"'^g
+       s^@MODULE@^'"$MODULE"'^g
+       ' $TEMPLATE > $TESTCASE.c
+
+if [ ! -e "$TESTCASE.c" ]; then
+       echo "Failed"
+       exit 1
+fi
+
+echo "/elm_ts/$WINSET/$TESTCASE" >> tslist
+
+echo "Testcase file is $TESTCASE.c"
+echo "$TESTCASE is added to tslist"
+echo "Done"
+echo "please put \"$TESTCASE\" as Target in Makefile"
diff --git a/TC/elm_ts/stackedicon/tet_captured b/TC/elm_ts/stackedicon/tet_captured
new file mode 100644 (file)
index 0000000..4121391
--- /dev/null
@@ -0,0 +1 @@
+make: `utc_UIFW_elm_stackedicon_item_list_get_func' is up to date.
diff --git a/TC/elm_ts/stackedicon/tslist b/TC/elm_ts/stackedicon/tslist
new file mode 100644 (file)
index 0000000..4623379
--- /dev/null
@@ -0,0 +1,5 @@
+/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_add_func
+/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_append_func
+/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_prepend_func
+/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_del_func
+/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_list_get_func
diff --git a/TC/elm_ts/stackedicon/utc_MODULE_API_func.c.in b/TC/elm_ts/stackedicon/utc_MODULE_API_func.c.in
new file mode 100755 (executable)
index 0000000..6c6febe
--- /dev/null
@@ -0,0 +1,104 @@
+#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;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_@MODULE@_@API@_func_01(void);
+static void utc_@MODULE@_@API@_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_@MODULE@_@API@_func_01, POSITIVE_TC_IDX },
+       { utc_@MODULE@_@API@_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);     
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of @API@()
+ */
+static void utc_@MODULE@_@API@_func_01(void)
+{
+       int r = 0;
+
+/*
+       r = @API@(...);
+*/
+       if (!r) {
+               tet_infoline("@API@() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init @API@()
+ */
+static void utc_@MODULE@_@API@_func_02(void)
+{
+       int r = 0;
+
+/*
+       r = @API@(...);
+*/
+       if (r) {
+               tet_infoline("@API@() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_add_func.c b/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_add_func.c
new file mode 100755 (executable)
index 0000000..d8b19b0
--- /dev/null
@@ -0,0 +1,106 @@
+#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;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_stackedicon_add_func_01(void);
+static void utc_UIFW_elm_stackedicon_add_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_stackedicon_add_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_stackedicon_add_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);     
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_stackedicon_add()
+ */
+static void utc_UIFW_elm_stackedicon_add_func_01(void)
+{
+       Evas_Object *r = NULL;
+
+       tet_infoline("[[ DEBUG :: Positive ]]");
+       
+       r = elm_stackedicon_add(main_win);
+       if (!r) {
+               tet_infoline("elm_stackedicon_add() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_stackedicon_add().");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_stackedicon_add()
+ */
+static void utc_UIFW_elm_stackedicon_add_func_02(void)
+{
+       Evas_Object* r = NULL;
+
+       tet_infoline("[[ DEBUG:: Negative ]]");
+       
+       r = elm_stackedicon_add(NULL);
+       if (r) {
+               tet_infoline("elm_stackedicon_add() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, elm_stackedicon_add().");
+}
diff --git a/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_append_func.c b/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_append_func.c
new file mode 100755 (executable)
index 0000000..f372afa
--- /dev/null
@@ -0,0 +1,144 @@
+#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, *stackedicon;
+
+static char *icon_path[] = {
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_stackedicon_item_append_func_01(void);
+static void utc_UIFW_elm_stackedicon_item_append_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_stackedicon_item_append_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_stackedicon_item_append_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);     
+
+       stackedicon = elm_stackedicon_add(main_win);
+       evas_object_show(stackedicon);
+       elm_win_resize_object_add(main_win, stackedicon);
+       evas_object_size_hint_align_set(stackedicon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(stackedicon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != stackedicon ) {
+               evas_object_del(stackedicon);
+           stackedicon = NULL;
+       }
+       
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+           main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_stackedicon_item_append()
+ */
+static void utc_UIFW_elm_stackedicon_item_append_func_01(void)
+{
+       Elm_Stackedicon_Item *it = NULL;
+
+       tet_infoline("[[ DEBUG :: Positive ]]");
+
+       it = elm_stackedicon_item_append(stackedicon, icon_path[0]);
+       if (!it) {
+               tet_infoline("elm_stackedicon_item_append() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_stackedicon_item_append().");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_stackedicon_item_append()
+ */
+static void utc_UIFW_elm_stackedicon_item_append_func_02(void)
+{
+       Elm_Imageslider_Item *it = NULL;
+       
+       tet_infoline("[[ DEBUG:: Negative ]]");
+
+       it = elm_stackedicon_item_append(NULL, icon_path[1]);
+       if (it) {
+               tet_infoline("elm_stackedicon_item_append() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, elm_stackedicon_item_append().");
+}
diff --git a/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_del_func.c b/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_del_func.c
new file mode 100755 (executable)
index 0000000..ca1a86d
--- /dev/null
@@ -0,0 +1,152 @@
+#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, *stackedicon;
+Elm_Stackedicon_Item *it;
+
+static char *icon_path[] = {
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_stackedicon_item_del_func_01(void);
+static void utc_UIFW_elm_stackedicon_item_del_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_stackedicon_item_del_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_stackedicon_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);     
+
+       stackedicon = elm_stackedicon_add(main_win);
+       evas_object_show(stackedicon);
+       elm_win_resize_object_add(main_win, stackedicon);
+       evas_object_size_hint_align_set(stackedicon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(stackedicon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != stackedicon ) {
+               evas_object_del(stackedicon);
+               stackedicon = NULL;
+       }
+
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_stackedicon_item_del()
+ */
+static void utc_UIFW_elm_stackedicon_item_del_func_01(void)
+{
+       Eina_List *list = NULL;
+       
+       tet_infoline("[[ DEBUG :: Positive ]]");
+
+       it = elm_stackedicon_item_append(stackedicon, icon_path[0]);
+       elm_stackedicon_item_del(it);
+
+       list = elm_stackedicon_item_list_get(stackedicon);
+       if (list) {
+               tet_infoline("elm_stackedicon_item_del() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_stackedicon_item_del().");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_stackedicon_item_del()
+ */
+static void utc_UIFW_elm_stackedicon_item_del_func_02(void)
+{
+       Eina_List *list = NULL;
+       
+       tet_infoline("[[ DEBUG :: Negative ]]");
+
+       it = elm_stackedicon_item_append(stackedicon, icon_path[0]);
+       elm_stackedicon_item_del(NULL);
+
+       list = elm_stackedicon_item_list_get(stackedicon);
+       if (!list) {
+               tet_infoline("elm_stackedicon_item_del() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, elm_stackedicon_item_del().");
+}
diff --git a/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_list_get_func.c b/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_list_get_func.c
new file mode 100755 (executable)
index 0000000..f75c85f
--- /dev/null
@@ -0,0 +1,167 @@
+#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, *stackedicon;
+Elm_Stackedicon_Item *it1, *it2, *it3;
+
+
+static char *icon_path[] = {
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_stackedicon_item_list_get_func_01(void);
+static void utc_UIFW_elm_stackedicon_item_list_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_stackedicon_item_list_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_stackedicon_item_list_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);     
+
+       stackedicon = elm_stackedicon_add(main_win);
+       evas_object_show(stackedicon);
+       elm_win_resize_object_add(main_win, stackedicon);
+       evas_object_size_hint_align_set(stackedicon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(stackedicon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       it1 = elm_stackedicon_item_append(stackedicon, icon_path[0]);
+       it2 = elm_stackedicon_item_append(stackedicon, icon_path[0]);
+       it3 = elm_stackedicon_item_append(stackedicon, icon_path[0]);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != stackedicon ) {
+               evas_object_del(stackedicon);
+               stackedicon = NULL;
+       }
+
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_stackedicon_item_list_get()
+ */
+static void utc_UIFW_elm_stackedicon_item_list_get_func_01(void)
+{
+       Eina_List *list = NULL;
+       Elm_Stackedicon_Item *it = NULL;
+
+       tet_infoline("[[ DEBUG :: Positive ]]");
+       
+       list = elm_stackedicon_item_list_get(stackedicon);
+       if (!list) {
+               tet_infoline("elm_stackedicon_item_list_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+
+       it = eina_list_data_get(list);
+       if (it != it1) {
+               tet_infoline("elm_stackedicon_item_list_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       
+       it = eina_list_data_get(eina_list_last(list));
+       if (it != it3) {
+               tet_infoline("elm_stackedicon_item_list_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_stackedicon_item_list_get().");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_stackedicon_item_list_get()
+ */
+static void utc_UIFW_elm_stackedicon_item_list_get_func_02(void)
+{
+       Eina_List *list = NULL;
+       Elm_Imageslider_Item *it = NULL;
+       
+       tet_infoline("[[ DEBUG:: Negative ]]");
+
+       list = elm_stackedicon_item_list_get(NULL);
+       if (list) {
+               tet_infoline("elm_stackedicon_item_list_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, elm_stackedicon_item_list_get().");
+}
diff --git a/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_prepend_func.c b/TC/elm_ts/stackedicon/utc_UIFW_elm_stackedicon_item_prepend_func.c
new file mode 100755 (executable)
index 0000000..93f3da8
--- /dev/null
@@ -0,0 +1,141 @@
+#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, *stackedicon;
+
+static char *icon_path[] = {
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item1.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item2.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item3.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item4.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item5.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item6.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item7.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item8.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item9.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item10.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item11.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item12.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item13.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item14.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item15.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item16.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item17.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item18.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item19.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item20.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item21.jpg",
+        "/usr/share/beat_winset_test/icon/Albums_Item/Albums_Item22.jpg",
+};
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_stackedicon_item_prepend_func_01(void);
+static void utc_UIFW_elm_stackedicon_item_prepend_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_stackedicon_item_prepend_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_stackedicon_item_prepend_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);     
+
+       stackedicon = elm_stackedicon_add(main_win);
+       evas_object_show(stackedicon);
+       elm_win_resize_object_add(main_win, stackedicon);
+       evas_object_size_hint_align_set(stackedicon, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       evas_object_size_hint_weight_set(stackedicon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+}
+
+static void cleanup(void)
+{
+       if ( NULL != stackedicon ) {
+               evas_object_del(stackedicon);
+               stackedicon = NULL;
+       }
+
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+           main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+/**
+ * @brief Positive test case of elm_stackedicon_item_prepend()
+ */
+static void utc_UIFW_elm_stackedicon_item_prepend_func_01(void)
+{
+       Elm_Stackedicon_Item *it = NULL;
+
+       tet_infoline("[[ DEBUG :: Positive ]]");
+
+       it = elm_stackedicon_item_prepend(stackedicon, icon_path[0]);
+       if (!it) {
+               tet_infoline("elm_stackedicon_item_prepend() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_01, [TYPE]: Positive, [RESULT]:PASS, elm_stackedicon_item_prepend().");
+}
+
+/**
+ * @brief Negative test case of ug_init elm_stackedicon_item_prepend()
+ */
+static void utc_UIFW_elm_stackedicon_item_prepend_func_02(void)
+{
+       Elm_Imageslider_Item *it = NULL;
+       
+       tet_infoline("[[ DEBUG:: Negative ]]");
+
+       it = elm_stackedicon_item_prepend(NULL, icon_path[1]);
+       if (it) {
+               tet_infoline("elm_stackedicon_item_prepend() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+       tet_infoline("[[ TET_MSG ]]::[ID]:TC_02, [TYPE]: Negative, [RESULT]:PASS, elm_stackedicon_item_prepend().");
+}