[Elm_Index] TestCases Added.
authorPrince Kumar Dubey <prince.dubey@samsung.com>
Thu, 23 Sep 2010 05:18:43 +0000 (10:48 +0530)
committerPrince Kumar Dubey <prince.dubey@samsung.com>
Thu, 23 Sep 2010 05:18:43 +0000 (10:48 +0530)
39 files changed:
TC/elm_ts/index/Makefile [new file with mode: 0755]
TC/elm_ts/index/tc_gen.sh [new file with mode: 0755]
TC/elm_ts/index/tslist [new file with mode: 0755]
TC/elm_ts/index/utc_MODULE_API_func.c.in [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_active_set_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_active_set_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_add_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_add_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_append_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_append_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_append_relative_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_append_relative_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_clear_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_clear_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_data_get_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_data_get_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_data_set_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_data_set_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_del_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_del_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_find_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_find_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_go_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_go_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_letter_get_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_letter_get_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_level_get_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_level_get_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_level_set_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_level_set_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_relative_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_relative_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_selected_get_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_selected_get_func.c [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_sorted_insert_func [new file with mode: 0755]
TC/elm_ts/index/utc_UIFW_elm_index_item_sorted_insert_func.c [new file with mode: 0755]
src/lib/elm_index.c

diff --git a/TC/elm_ts/index/Makefile b/TC/elm_ts/index/Makefile
new file mode 100755 (executable)
index 0000000..b5f4cdc
--- /dev/null
@@ -0,0 +1,40 @@
+CC ?= gcc
+
+TARGETS = utc_UIFW_elm_index_add_func \
+               utc_UIFW_elm_index_active_set_func \
+               utc_UIFW_elm_index_item_append_func \
+               utc_UIFW_elm_index_item_append_relative_func \
+               utc_UIFW_elm_index_item_data_get_func \
+               utc_UIFW_elm_index_item_data_set_func \
+               utc_UIFW_elm_index_item_del_func \
+               utc_UIFW_elm_index_item_find_func \
+               utc_UIFW_elm_index_item_go_func \
+               utc_UIFW_elm_index_item_letter_get_func \
+               utc_UIFW_elm_index_item_level_set_func \
+               utc_UIFW_elm_index_item_prepend_func \
+               utc_UIFW_elm_index_item_prepend_relative_func \
+               utc_UIFW_elm_index_item_selected_get_func \
+               utc_UIFW_elm_index_item_sorted_insert_func \
+               utc_UIFW_elm_index_item_clear_func      \
+               utc_UIFW_elm_index_item_level_get_func
+
+PKGS = elementary
+
+LDFLAGS = `pkg-config --libs $(PKGS)`
+LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
+
+CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+CFLAGS += -I$(TET_ROOT)/inc/tet3
+CFLAGS += -Wall
+
+all: $(TARGETS)
+
+$(TARGET): %: %.c
+       $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
+clean:
+       rm -f $(TARGETS)
+       rm -f tet_captured
+       rm -f *~
diff --git a/TC/elm_ts/index/tc_gen.sh b/TC/elm_ts/index/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/index/tslist b/TC/elm_ts/index/tslist
new file mode 100755 (executable)
index 0000000..998ece1
--- /dev/null
@@ -0,0 +1,17 @@
+/elm_ts/index/utc_UIFW_elm_index_add_func
+/elm_ts/index/utc_UIFW_elm_index_active_set_func
+/elm_ts/index/utc_UIFW_elm_index_item_append_func
+/elm_ts/index/utc_UIFW_elm_index_item_append_relative_func
+/elm_ts/index/utc_UIFW_elm_index_item_data_get_func
+/elm_ts/index/utc_UIFW_elm_index_item_data_set_func
+/elm_ts/index/utc_UIFW_elm_index_item_del_func
+/elm_ts/index/utc_UIFW_elm_index_item_find_func
+/elm_ts/index/utc_UIFW_elm_index_item_go_func
+/elm_ts/index/utc_UIFW_elm_index_item_letter_get_func
+/elm_ts/index/utc_UIFW_elm_index_item_level_set_func
+/elm_ts/index/utc_UIFW_elm_index_item_prepend_func
+/elm_ts/index/utc_UIFW_elm_index_item_prepend_relative_func
+/elm_ts/index/utc_UIFW_elm_index_item_selected_get_func
+/elm_ts/index/utc_UIFW_elm_index_item_sorted_insert_func
+/elm_ts/index/utc_UIFW_elm_index_item_clear_func
+/elm_ts/index/utc_UIFW_elm_index_item_level_get_func
diff --git a/TC/elm_ts/index/utc_MODULE_API_func.c.in b/TC/elm_ts/index/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/index/utc_UIFW_elm_index_active_set_func b/TC/elm_ts/index/utc_UIFW_elm_index_active_set_func
new file mode 100755 (executable)
index 0000000..6494851
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_active_set_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_active_set_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_active_set_func.c
new file mode 100755 (executable)
index 0000000..0c56cf2
--- /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_UIFW_elm_index_active_set_func_01(void);
+static void utc_UIFW_elm_index_active_set_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_active_set_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_active_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);     
+}
+
+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_index_active_set()
+ */
+static void utc_UIFW_elm_index_active_set_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       idx= elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       elm_index_active_set(idx,0);
+       if (!idx) {
+               tet_infoline("elm_index_active_set() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_active_set()
+ */
+static void utc_UIFW_elm_index_active_set_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       idx = elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       elm_index_active_set(NULL,1);
+       if (!idx) {
+               tet_infoline("elm_index_active_set() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_add_func b/TC/elm_ts/index/utc_UIFW_elm_index_add_func
new file mode 100755 (executable)
index 0000000..c120cc8
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_add_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_add_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_add_func.c
new file mode 100755 (executable)
index 0000000..20d9de9
--- /dev/null
@@ -0,0 +1,102 @@
+#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_index_add_func_01(void);
+static void utc_UIFW_elm_index_add_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_add_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_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_index_add()
+ */
+static void utc_UIFW_elm_index_add_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       idx= elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       if (!idx) {
+               tet_infoline("elm_index_add() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_add()
+ */
+static void utc_UIFW_elm_index_add_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       idx = elm_index_add(NULL);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       if (!idx) {
+               tet_infoline("elm_index_add() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_append_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_append_func
new file mode 100755 (executable)
index 0000000..7a51fcd
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_append_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_append_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_append_func.c
new file mode 100755 (executable)
index 0000000..9b0b955
--- /dev/null
@@ -0,0 +1,147 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_append_func_01(void);
+static void utc_UIFW_elm_index_item_append_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_append_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_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);     
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_append()
+ */
+static void utc_UIFW_elm_index_item_append_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Elm_Index_Item *idx_it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       const char  *letter = NULL;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+       evas_object_show(gl);
+       evas_object_show(idx);
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+               if(i == 39)
+                       idx_it = it;
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);
+       letter = elm_index_item_letter_get(idx_it);
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_append()
+ */
+static void utc_UIFW_elm_index_item_append_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(NULL, buf, it);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_append_relative_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_append_relative_func
new file mode 100755 (executable)
index 0000000..e0fd897
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_append_relative_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_append_relative_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_append_relative_func.c
new file mode 100755 (executable)
index 0000000..7113acc
--- /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;
+static Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_append_relative_func_01(void);
+static void utc_UIFW_elm_index_item_append_relative_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_append_relative_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_append_relative_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 ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_append_relative()
+ */
+static void utc_UIFW_elm_index_item_append_relative_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+       evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append_relative(idx, buf, it,(void*)2);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_append_relative()
+ */
+static void utc_UIFW_elm_index_item_append_relative_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL;
+       int i = 0, j = 0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);
+        evas_object_show(gl);
+       evas_object_show(idx);          
+           itci.item_style     = "default";
+           itci.func.label_get = gli_label_get;
+           itci.func.icon_get  = NULL;
+           itci.func.state_get = NULL;
+           itci.func.del       = NULL;
+      for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append_relative(NULL, buf, it,(void*)2);
+        }
+        j += 2;
+       }
+       elm_index_item_go(idx, 0);      
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_clear_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_clear_func
new file mode 100755 (executable)
index 0000000..3860bb7
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_clear_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_clear_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_clear_func.c
new file mode 100755 (executable)
index 0000000..02b454e
--- /dev/null
@@ -0,0 +1,143 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_clear_func_01(void);
+static void utc_UIFW_elm_index_item_clear_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_clear_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_clear_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 ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_clear()
+ */
+static void utc_UIFW_elm_index_item_clear_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+       evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+    }
+       elm_index_item_go(idx, 0);
+    elm_index_item_clear(idx); 
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_clear()
+ */
+static void utc_UIFW_elm_index_item_clear_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(NULL, buf, it);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);
+       elm_index_item_clear(NULL);
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_data_get_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_data_get_func
new file mode 100755 (executable)
index 0000000..8c760f7
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_data_get_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_data_get_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_data_get_func.c
new file mode 100755 (executable)
index 0000000..dc28154
--- /dev/null
@@ -0,0 +1,166 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_data_get_func_01(void);
+static void utc_UIFW_elm_index_item_data_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_data_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_data_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);     
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_data_get()
+ */
+static void utc_UIFW_elm_index_item_data_get_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Elm_Genlist_Item *it_gl = NULL;
+       Elm_Index_Item *item = NULL;
+       Evas_Object *gl = NULL;
+       void *d = NULL;
+       int i = 0, j = 0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+         if(i==0)
+         it_gl=it;
+    }
+       elm_index_item_go(idx, 0);
+        item = elm_index_item_find(idx,it_gl); 
+       d =  (void*)elm_index_item_data_get(item);
+       if(!item) {
+               tet_infoline("elm_index_item_data_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_data_get()
+ */
+static void utc_UIFW_elm_index_item_data_get_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Elm_Genlist_Item *it_gl = NULL;
+       Elm_Index_Item *item = NULL;
+       Evas_Object *gl = NULL;
+       void *d = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+         if(i==0)
+         it_gl=it;
+    }
+       elm_index_item_go(idx, 0);
+        item = elm_index_item_find(NULL,it_gl);        
+       d = (void *) elm_index_item_data_get(NULL);
+       if(d) {
+         tet_infoline("elm_index_item_data_get() with argument as NULL failed in negative test case");
+         tet_result(TET_FAIL);
+         return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_data_set_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_data_set_func
new file mode 100755 (executable)
index 0000000..232c315
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_data_set_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_data_set_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_data_set_func.c
new file mode 100755 (executable)
index 0000000..3c3f6bd
--- /dev/null
@@ -0,0 +1,176 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_data_set_func_01(void);
+static void utc_UIFW_elm_index_item_data_set_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_data_set_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_data_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);     
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_data_set()
+ */
+static void utc_UIFW_elm_index_item_data_set_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Elm_Genlist_Item *it_gl = NULL;
+       Elm_Genlist_Item *it_glist = NULL;
+       Elm_Index_Item *item = NULL;
+       void *d = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+       evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+         if(i==0)
+           it_gl=it;
+         if(i==4)
+           it_glist=it;
+    }
+       elm_index_item_go(idx, 0);
+    item = elm_index_item_find(idx,it_gl);
+    elm_index_item_data_set(item,it_glist );   
+       d = (void *) elm_index_item_data_get(item);
+       if(!d) {
+               tet_infoline("elm_index_item_data_set() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_data_set()
+ */
+static void utc_UIFW_elm_index_item_data_set_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Elm_Genlist_Item *it_gl = NULL;
+       Elm_Genlist_Item *it_glist = NULL;
+       Elm_Index_Item *item = NULL;
+       void *d = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);
+    evas_object_show(gl);
+       evas_object_show(idx);          
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+
+         if(i==0)
+           it_gl=it;
+         if(i==4)
+           it_glist=it;
+    }
+       elm_index_item_go(idx, 0);
+       item = elm_index_item_find(idx,it_gl);
+       elm_index_item_data_set(NULL,it_glist );        
+       d = (void *) elm_index_item_data_get(item);
+       if(!d) {
+               tet_infoline("elm_index_item_data_set() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_del_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_del_func
new file mode 100755 (executable)
index 0000000..2fd4059
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_del_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_del_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_del_func.c
new file mode 100755 (executable)
index 0000000..8d9ad95
--- /dev/null
@@ -0,0 +1,145 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_del_func_01(void);
+static void utc_UIFW_elm_index_item_del_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_del_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_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);     
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_del()
+ */
+static void utc_UIFW_elm_index_item_del_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL;
+       int i = 0, j = 0;
+       char ch='C';
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);
+    evas_object_show(gl);
+       evas_object_show(idx);          
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+    }
+       elm_index_item_go(idx, 0);
+       elm_index_item_del(idx, &ch);
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_del()
+ */
+static void utc_UIFW_elm_index_item_del_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       char ch='C';
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;
+    }
+       elm_index_item_go(idx, 0);
+       elm_index_item_del(NULL, &ch);  
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_find_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_find_func
new file mode 100755 (executable)
index 0000000..c32c9fa
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_find_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_find_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_find_func.c
new file mode 100755 (executable)
index 0000000..632dd8f
--- /dev/null
@@ -0,0 +1,160 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_find_func_01(void);
+static void utc_UIFW_elm_index_item_find_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_find_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_find_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 ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_find()
+ */
+static void utc_UIFW_elm_index_item_find_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL,*it_gl = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Index_Item *item = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+       evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+         if(i==0)
+         it_gl=it;
+    }
+       elm_index_item_go(idx, 0);
+       item = elm_index_item_find(idx,it_gl);  
+       if(!item) {
+               tet_infoline("elm_index_item_find() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_find()
+ */
+static void utc_UIFW_elm_index_item_find_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL,*it_gl = NULL;
+       Elm_Index_Item *item = NULL;
+       int i,j=0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+         if(i==0)
+         it_gl=it;
+    }
+       elm_index_item_go(idx, 0);
+    item = elm_index_item_find(NULL,it_gl);    
+       if(item) {
+               tet_infoline("elm_index_item_find() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_go_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_go_func
new file mode 100755 (executable)
index 0000000..4fc6045
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_go_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_go_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_go_func.c
new file mode 100755 (executable)
index 0000000..cca9823
--- /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;
+static Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_go_func_01(void);
+static void utc_UIFW_elm_index_item_go_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_go_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_go_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 ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_go()
+ */
+static void utc_UIFW_elm_index_item_go_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx,0);
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_go()
+ */
+static void utc_UIFW_elm_index_item_go_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(NULL, buf, it);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(NULL,0);
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_letter_get_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_letter_get_func
new file mode 100755 (executable)
index 0000000..cf9a547
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_letter_get_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_letter_get_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_letter_get_func.c
new file mode 100755 (executable)
index 0000000..8d931f7
--- /dev/null
@@ -0,0 +1,165 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_letter_get_func_01(void);
+static void utc_UIFW_elm_index_item_letter_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_letter_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_letter_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);     
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_letter_get()
+ */
+static void utc_UIFW_elm_index_item_letter_get_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL,*it_gl = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Index_Item *item = NULL;
+       const char *ptr = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);
+    evas_object_show(gl);
+       evas_object_show(idx);          
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+         if(i==0)
+         it_gl=it;
+    }
+       elm_index_item_go(idx, 0);
+        item = elm_index_item_find(idx,it_gl); 
+       ptr = elm_index_item_letter_get(item);
+       if(!ptr) {
+               tet_infoline("elm_index_item_letter_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_letter_get()
+ */
+static void utc_UIFW_elm_index_item_letter_get_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL,*it_gl = NULL;
+       Elm_Index_Item *item = NULL;
+       Evas_Object *gl = NULL;
+       const char *ptr = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+        }
+        j += 2;        
+         if(i==0)
+         it_gl=it;
+    }
+       elm_index_item_go(idx, 0);      
+        item = elm_index_item_find(NULL,it_gl);        
+       ptr = elm_index_item_letter_get(NULL);
+       if(ptr) {
+               tet_infoline("elm_index_item_letter_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_level_get_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_level_get_func
new file mode 100755 (executable)
index 0000000..3c86909
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_level_get_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_level_get_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_level_get_func.c
new file mode 100755 (executable)
index 0000000..f5f8531
--- /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;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_level_get_func_01(void);
+static void utc_UIFW_elm_index_item_level_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_level_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_level_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);     
+}
+
+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_index_item_level_get()
+ */
+static void utc_UIFW_elm_index_item_level_get_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       int level = -1;
+       
+       idx = elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       elm_index_item_level_set(idx,0);
+       level = elm_index_item_level_get(idx);
+       if (level!=0) { 
+               tet_infoline("elm_index_item_level_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_level_get()
+ */
+static void utc_UIFW_elm_index_item_level_get_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       int level,item_level;
+       idx = elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       item_level = elm_index_item_level_get(idx);
+       elm_index_item_level_set(NULL,1);
+       level = elm_index_item_level_get(idx);
+       if (level!=item_level) {        
+               tet_infoline("elm_index_item_level_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_level_set_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_level_set_func
new file mode 100755 (executable)
index 0000000..86a1252
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_level_set_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_level_set_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_level_set_func.c
new file mode 100755 (executable)
index 0000000..4977792
--- /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;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_level_set_func_01(void);
+static void utc_UIFW_elm_index_item_level_set_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_level_set_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_level_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);     
+}
+
+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_index_item_level_set()
+ */
+static void utc_UIFW_elm_index_item_level_set_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       int level = -1;
+       idx = elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       elm_index_item_level_set(idx,0);
+       level = elm_index_item_level_get(idx);
+       if (level!=0) { 
+               tet_infoline("elm_index_item_level_set() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_level_set()
+ */
+static void utc_UIFW_elm_index_item_level_set_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       int level = -1,item_level;
+       idx = elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       item_level = elm_index_item_level_get(idx);
+       elm_index_item_level_set(NULL,1);
+       level = elm_index_item_level_get(idx);
+       if (level!=item_level) {        
+               tet_infoline("elm_index_item_level_set() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_func
new file mode 100755 (executable)
index 0000000..8d0a534
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_func.c
new file mode 100755 (executable)
index 0000000..0e8ee9b
--- /dev/null
@@ -0,0 +1,143 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_prepend_func_01(void);
+static void utc_UIFW_elm_index_item_prepend_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_prepend_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_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);     
+}
+
+static void cleanup(void)
+{
+       if ( NULL != main_win ) {
+               evas_object_del(main_win);
+               main_win = NULL;
+       }
+       elm_shutdown();
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_prepend()
+ */
+static void utc_UIFW_elm_index_item_prepend_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_prepend(idx, buf, it);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_prepend()
+ */
+static void utc_UIFW_elm_index_item_prepend_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Elm_Genlist_Item *it = NULL;
+       Evas_Object *gl = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_prepend(NULL, buf, it);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_relative_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_relative_func
new file mode 100755 (executable)
index 0000000..14e926a
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_relative_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_relative_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_prepend_relative_func.c
new file mode 100755 (executable)
index 0000000..ffdb4f8
--- /dev/null
@@ -0,0 +1,143 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_prepend_relative_func_01(void);
+static void utc_UIFW_elm_index_item_prepend_relative_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_prepend_relative_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_prepend_relative_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 ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_prepend_relative()
+ */
+static void utc_UIFW_elm_index_item_prepend_relative_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+        evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_prepend_relative(idx, buf, it,(void*)2);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_prepend_relative()
+ */
+static void utc_UIFW_elm_index_item_prepend_relative_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+       evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_prepend_relative(NULL, buf, it,(void*)2);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_selected_get_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_selected_get_func
new file mode 100755 (executable)
index 0000000..2f8bf6f
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_selected_get_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_selected_get_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_selected_get_func.c
new file mode 100755 (executable)
index 0000000..d300701
--- /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_index_item_selected_get_func_01(void);
+static void utc_UIFW_elm_index_item_selected_get_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_selected_get_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_selected_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);     
+}
+
+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_index_item_selected_get()
+ */
+static void utc_UIFW_elm_index_item_selected_get_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       void *d;
+       idx= elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       d = (void *)elm_index_item_selected_get(idx,0);
+       if (d) {
+               tet_infoline("elm_index_item_selected_get() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_selected_get()
+ */
+static void utc_UIFW_elm_index_item_selected_get_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       void *d ;
+       idx = elm_index_add(main_win);
+       evas_object_show(idx);
+       elm_index_item_go(idx, 0);
+       d = (void *)elm_index_item_selected_get(NULL,0);        
+       if (d) {
+               tet_infoline("elm_index_item_selected_get() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_sorted_insert_func b/TC/elm_ts/index/utc_UIFW_elm_index_item_sorted_insert_func
new file mode 100755 (executable)
index 0000000..8612db8
Binary files /dev/null and b/TC/elm_ts/index/utc_UIFW_elm_index_item_sorted_insert_func differ
diff --git a/TC/elm_ts/index/utc_UIFW_elm_index_item_sorted_insert_func.c b/TC/elm_ts/index/utc_UIFW_elm_index_item_sorted_insert_func.c
new file mode 100755 (executable)
index 0000000..04dcc56
--- /dev/null
@@ -0,0 +1,145 @@
+#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 Elm_Genlist_Item_Class itci;
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_UIFW_elm_index_item_sorted_insert_func_01(void);
+static void utc_UIFW_elm_index_item_sorted_insert_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_UIFW_elm_index_item_sorted_insert_func_01, POSITIVE_TC_IDX },
+       { utc_UIFW_elm_index_item_sorted_insert_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 ============ ");
+}
+
+char *gli_label_get(const void *data, Evas_Object *obj, const char *part)
+{
+   char buf[256];
+   int j = (int)data;
+   snprintf(buf, sizeof(buf), "%c%c", 
+            'A' + ((j >> 4) & 0xf),
+            'a' + ((j     ) & 0xf)
+            );
+   return strdup(buf);
+}
+/**
+ * @brief Positive test case of elm_index_item_sorted_insert()
+ */
+static void utc_UIFW_elm_index_item_sorted_insert_func_01(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+         evas_object_show(gl);
+       evas_object_show(idx);  
+           itci.item_style     = "default";
+           itci.func.label_get = gli_label_get;
+           itci.func.icon_get  = NULL;
+           itci.func.state_get = NULL;
+           itci.func.del       = NULL;
+           for (i = 0; i < 40; i++) {
+             it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+             if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_append(idx, buf, it);
+          }
+        j += 2;
+       }
+       it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+       elm_index_item_sorted_insert(idx, NULL, it, NULL, NULL);
+       elm_index_item_go(idx, 0);      
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init elm_index_item_sorted_insert()
+ */
+static void utc_UIFW_elm_index_item_sorted_insert_func_02(void)
+{
+       Evas_Object *idx = NULL;
+       Evas_Object *gl = NULL;
+       Elm_Genlist_Item *it = NULL;
+       int i = 0, j = 0;
+       
+       gl = elm_genlist_add(main_win);
+       idx= elm_index_add(main_win);   
+    evas_object_show(gl);
+       evas_object_show(idx);  
+    itci.item_style     = "default";
+    itci.func.label_get = gli_label_get;
+    itci.func.icon_get  = NULL;
+    itci.func.state_get = NULL;
+    itci.func.del       = NULL;
+    for (i = 0; i < 40; i++) {
+      it = elm_genlist_item_append(gl, &itci,(void *)j, NULL, ELM_GENLIST_ITEM_NONE, NULL,NULL);
+      if ((j & 0xf) == 0) {
+                char buf[32];
+         snprintf(buf, sizeof(buf), "%c", 'A' + ((j >> 4) & 0xf));
+         elm_index_item_sorted_insert(NULL, buf, it, NULL, NULL);
+        }
+        j += 2;
+    }  
+       elm_index_item_go(idx, 0);      
+       tet_result(TET_PASS);
+}
index 391fcca..7b96d64 100755 (executable)
@@ -618,6 +618,7 @@ elm_index_add(Evas_Object *parent)
 
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
+   if(!e) return NULL;
    obj = elm_widget_add(e);
    ELM_SET_WIDTYPE(widtype, "index");
    elm_widget_type_set(obj, "index");