--- /dev/null
+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 *~
--- /dev/null
+#!/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"
--- /dev/null
+/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
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
--- /dev/null
+#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);
+}
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");