From: Jeahwan Kim Date: Wed, 22 Sep 2010 10:58:13 +0000 (+0900) Subject: [controlbar] add TC X-Git-Tag: origin~148^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a27ad5a910b6e190d2d4bdde860cc46ed6c55880;p=framework%2Fuifw%2Felementary.git [controlbar] add TC --- diff --git a/TC/elm_ts/controlbar/Makefile b/TC/elm_ts/controlbar/Makefile new file mode 100755 index 0000000..28d23e7 --- /dev/null +++ b/TC/elm_ts/controlbar/Makefile @@ -0,0 +1,36 @@ +CC ?= gcc + +TARGETS = uts_elm_controlbar_add_func \ + uts_elm_controlbar_tab_item_append_func \ + uts_elm_controlbar_tab_item_prepend_func \ + uts_elm_controlbar_tab_item_insert_before_func \ + uts_elm_controlbar_tab_item_insert_after_func \ + uts_elm_controlbar_tool_item_append_func \ + uts_elm_controlbar_tool_item_prepend_func \ + uts_elm_controlbar_tool_item_insert_before_func \ + uts_elm_controlbar_tool_item_insert_after_func \ + uts_elm_controlbar_object_item_append_func \ + uts_elm_controlbar_object_item_prepend_func \ + uts_elm_controlbar_object_item_insert_before_func \ + uts_elm_controlbar_object_item_insert_after_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/controlbar/tc_gen.sh b/TC/elm_ts/controlbar/tc_gen.sh new file mode 100755 index 0000000..a55200a --- /dev/null +++ b/TC/elm_ts/controlbar/tc_gen.sh @@ -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/controlbar/tslist b/TC/elm_ts/controlbar/tslist new file mode 100644 index 0000000..6f850a2 --- /dev/null +++ b/TC/elm_ts/controlbar/tslist @@ -0,0 +1,13 @@ +/elm_ts/controlbar/utc_UIFW_elm_controlbar_add_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_append_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_prepend_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_before_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_after_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_append_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_prepend_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_before_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_after_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_append_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_prepend_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_before_func +/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_after_func diff --git a/TC/elm_ts/controlbar/utc_MODULE_API_func.c.in b/TC/elm_ts/controlbar/utc_MODULE_API_func.c.in new file mode 100755 index 0000000..6c6febe --- /dev/null +++ b/TC/elm_ts/controlbar/utc_MODULE_API_func.c.in @@ -0,0 +1,104 @@ +#include +#include + +// 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/controlbar/utc_UIFW_elm_controlbar_add_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_add_func new file mode 100755 index 0000000..7f57fec Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_add_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_add_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_add_func.c new file mode 100644 index 0000000..64ff536 --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_add_func.c @@ -0,0 +1,104 @@ +#include +#include + +// 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_controlbar_add_func_01(void); +static void utc_UIFW_elm_controlbar_add_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_add_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_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_controlbar_add() + */ +static void utc_UIFW_elm_controlbar_add_func_01(void) +{ + Evas_Object *controlbar = NULL; + controlbar = elm_controlbar_add(main_win); + + if (!controlbar) { + tet_infoline("elm_controlbar_add() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + evas_object_del(controlbar); + controlbar = NULL; + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_add() + */ +static void utc_UIFW_elm_controlbar_add_func_02(void) +{ + Evas_Object *controlbar; + controlbar = elm_controlbar_add(NULL); + + if (controlbar) { + tet_infoline("elm_controlbar_add() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + evas_object_del(controlbar); + controlbar = NULL; + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_append_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_append_func new file mode 100755 index 0000000..1215806 Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_append_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_append_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_append_func.c new file mode 100644 index 0000000..5ad71f2 --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_append_func.c @@ -0,0 +1,116 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; +Evas_Object *button; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_object_item_append_func_01(void); +static void utc_UIFW_elm_controlbar_object_item_append_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_object_item_append_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_object_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); + + controlbar = elm_controlbar_add(main_win); + + button = elm_button_add(controlbar); + elm_button_label_set(button, "button"); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + if ( NULL != button ) { + evas_object_del(button); + button = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_object_item_append() + */ +static void utc_UIFW_elm_controlbar_object_item_append_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_object_item_append(controlbar, button, 3); + + if (!item) { + tet_infoline("elm_controlbar_object_item_append() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_object_item_append() + */ +static void utc_UIFW_elm_controlbar_object_item_append_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_object_item_append(NULL, button, 3); + + if (item) { + tet_infoline("elm_controlbar_object_item_append() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_after_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_after_func new file mode 100755 index 0000000..badf61a Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_after_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_after_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_after_func.c new file mode 100644 index 0000000..de425ae --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_after_func.c @@ -0,0 +1,120 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; +Evas_Object *button; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_object_item_insert_after_func_01(void); +static void utc_UIFW_elm_controlbar_object_item_insert_after_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_object_item_insert_after_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_object_item_insert_after_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } +}; + +static void startup(void) +{ + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); + + controlbar = elm_controlbar_add(main_win); + + button = elm_button_add(controlbar); + elm_button_label_set(button, "button"); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + if ( NULL != button ) { + evas_object_del(button); + button = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_object_item_insert_after() + */ +static void utc_UIFW_elm_controlbar_object_item_insert_after_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_object_item_append(controlbar, button, 2); + item2 = elm_controlbar_object_item_insert_before(controlbar, item, button, 3); + + if (!item2) { + tet_infoline("elm_controlbar_object_item_insert_after() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_object_item_insert_after() + */ +static void utc_UIFW_elm_controlbar_object_item_insert_after_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_object_item_append(controlbar, button, 2); + item2 = elm_controlbar_object_item_insert_before(controlbar, NULL, button, 3); + + if (item2) { + tet_infoline("elm_controlbar_object_item_insert_after() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_before_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_before_func new file mode 100755 index 0000000..5f2dd13 Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_before_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_before_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_before_func.c new file mode 100644 index 0000000..097713b --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_insert_before_func.c @@ -0,0 +1,120 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; +Evas_Object *button; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_object_item_insert_before_func_01(void); +static void utc_UIFW_elm_controlbar_object_item_insert_before_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_object_item_insert_before_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_object_item_insert_before_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } +}; + +static void startup(void) +{ + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); + + controlbar = elm_controlbar_add(main_win); + + button = elm_button_add(controlbar); + elm_button_label_set(button, "button"); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + if ( NULL != button ) { + evas_object_del(button); + button = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_object_item_insert_before() + */ +static void utc_UIFW_elm_controlbar_object_item_insert_before_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_object_item_append(controlbar, button, 2); + item2 = elm_controlbar_object_item_insert_before(controlbar, item, button, 3); + + if (!item2) { + tet_infoline("elm_controlbar_object_item_insert_before() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_object_item_insert_before() + */ +static void utc_UIFW_elm_controlbar_object_item_insert_before_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_object_item_append(controlbar, button, 2); + item2 = elm_controlbar_object_item_insert_before(controlbar, NULL, button, 3); + + if (item2) { + tet_infoline("elm_controlbar_object_item_insert_before() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_prepend_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_prepend_func new file mode 100755 index 0000000..9a14e1a Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_prepend_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_prepend_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_prepend_func.c new file mode 100644 index 0000000..0b0dcba --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_object_item_prepend_func.c @@ -0,0 +1,116 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; +Evas_Object *button; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_object_item_prepend_func_01(void); +static void utc_UIFW_elm_controlbar_object_item_prepend_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_object_item_prepend_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_object_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); + + controlbar = elm_controlbar_add(main_win); + + button = elm_button_add(controlbar); + elm_button_label_set(button, "button"); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + if ( NULL != button ) { + evas_object_del(button); + button = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_object_item_prepend() + */ +static void utc_UIFW_elm_controlbar_object_item_prepend_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_object_item_prepend(controlbar, button, 3); + + if (!item) { + tet_infoline("elm_controlbar_object_item_prepend() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_object_item_prepend() + */ +static void utc_UIFW_elm_controlbar_object_item_prepend_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_object_item_prepend(NULL, button, 3); + + if (item) { + tet_infoline("elm_controlbar_object_item_prepend() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_append_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_append_func new file mode 100755 index 0000000..6eadab4 Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_append_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_append_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_append_func.c new file mode 100644 index 0000000..cdd70b4 --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_append_func.c @@ -0,0 +1,115 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; +Evas_Object *view; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_tab_item_append_func_01(void); +static void utc_UIFW_elm_controlbar_tab_item_append_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_tab_item_append_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_tab_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); + + controlbar = elm_controlbar_add(main_win); + + view = elm_layout_add(controlbar); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + if ( NULL != view ) { + evas_object_del(view); + view = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_tab_item_append() + */ +static void utc_UIFW_elm_controlbar_tab_item_append_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_tab_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + + if (!item) { + tet_infoline("elm_controlbar_tab_item_append() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_tab_item_append() + */ +static void utc_UIFW_elm_controlbar_tab_item_append_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_tab_item_append(NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + + if (item) { + tet_infoline("elm_controlbar_tab_item_append() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_after_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_after_func new file mode 100755 index 0000000..a11e664 Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_after_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_after_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_after_func.c new file mode 100644 index 0000000..e02d7c5 --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_after_func.c @@ -0,0 +1,119 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; +Evas_Object *view; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_tab_item_insert_after_func_01(void); +static void utc_UIFW_elm_controlbar_tab_item_insert_after_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_tab_item_insert_after_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_tab_item_insert_after_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } +}; + +static void startup(void) +{ + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); + + controlbar = elm_controlbar_add(main_win); + + view = elm_layout_add(controlbar); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + if ( NULL != view ) { + evas_object_del(view); + view = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_tab_item_insert_after() + */ +static void utc_UIFW_elm_controlbar_tab_item_insert_after_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_tab_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + item2 = elm_controlbar_tab_item_insert_after(controlbar, item, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + + if (!item2) { + tet_infoline("elm_controlbar_tab_item_insert_after() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_tab_item_insert_after() + */ +static void utc_UIFW_elm_controlbar_tab_item_insert_after_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_tab_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + item2 = elm_controlbar_tab_item_insert_after(controlbar, NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + + if (item2) { + tet_infoline("elm_controlbar_tab_item_insert_after() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_before_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_before_func new file mode 100755 index 0000000..08ecdb7 Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_before_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_before_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_before_func.c new file mode 100644 index 0000000..089efd3 --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_insert_before_func.c @@ -0,0 +1,119 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; +Evas_Object *view; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_tab_item_insert_before_func_01(void); +static void utc_UIFW_elm_controlbar_tab_item_insert_before_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_tab_item_insert_before_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_tab_item_insert_before_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } +}; + +static void startup(void) +{ + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); + + controlbar = elm_controlbar_add(main_win); + + view = elm_layout_add(controlbar); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + if ( NULL != view ) { + evas_object_del(view); + view = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_tab_item_insert_before() + */ +static void utc_UIFW_elm_controlbar_tab_item_insert_before_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_tab_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + item2 = elm_controlbar_tab_item_insert_before(controlbar, item, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + + if (!item2) { + tet_infoline("elm_controlbar_tab_item_insert_before() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_tab_item_insert_before() + */ +static void utc_UIFW_elm_controlbar_tab_item_insert_before_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_tab_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + item2 = elm_controlbar_tab_item_insert_before(controlbar, NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + + if (item2) { + tet_infoline("elm_controlbar_tab_item_insert_before() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_prepend_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_prepend_func new file mode 100755 index 0000000..065c8a4 Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_prepend_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_prepend_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_prepend_func.c new file mode 100644 index 0000000..ee0b4f4 --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tab_item_prepend_func.c @@ -0,0 +1,115 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; +Evas_Object *view; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_tab_item_prepend_func_01(void); +static void utc_UIFW_elm_controlbar_tab_item_prepend_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_tab_item_prepend_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_tab_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); + + controlbar = elm_controlbar_add(main_win); + + view = elm_layout_add(controlbar); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + if ( NULL != view ) { + evas_object_del(view); + view = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_tab_item_prepend() + */ +static void utc_UIFW_elm_controlbar_tab_item_prepend_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_tab_item_prepend(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + + if (!item) { + tet_infoline("elm_controlbar_tab_item_prepend() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_tab_item_prepend() + */ +static void utc_UIFW_elm_controlbar_tab_item_prepend_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_tab_item_prepend(NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", view); + + if (item) { + tet_infoline("elm_controlbar_tab_item_prepend() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_append_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_append_func new file mode 100755 index 0000000..83e60ba Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_append_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_append_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_append_func.c new file mode 100644 index 0000000..c2816b7 --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_append_func.c @@ -0,0 +1,108 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_tool_item_append_func_01(void); +static void utc_UIFW_elm_controlbar_tool_item_append_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_tool_item_append_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_tool_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); + + controlbar = elm_controlbar_add(main_win); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_tool_item_append() + */ +static void utc_UIFW_elm_controlbar_tool_item_append_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_tool_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + + if (!item) { + tet_infoline("elm_controlbar_tool_item_append() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_tool_item_append() + */ +static void utc_UIFW_elm_controlbar_tool_item_append_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_tool_item_append(NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + + if (item) { + tet_infoline("elm_controlbar_tool_item_append() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_after_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_after_func new file mode 100755 index 0000000..43ecc1e Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_after_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_after_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_after_func.c new file mode 100644 index 0000000..2d7690f --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_after_func.c @@ -0,0 +1,112 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_tool_item_insert_after_func_01(void); +static void utc_UIFW_elm_controlbar_tool_item_insert_after_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_tool_item_insert_after_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_tool_item_insert_after_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } +}; + +static void startup(void) +{ + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); + + controlbar = elm_controlbar_add(main_win); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_tool_item_insert_after() + */ +static void utc_UIFW_elm_controlbar_tool_item_insert_after_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_tool_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + item2 = elm_controlbar_tool_item_insert_after(controlbar, item, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + + if (!item2) { + tet_infoline("elm_controlbar_tool_item_insert_after() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_tool_item_insert_after() + */ +static void utc_UIFW_elm_controlbar_tool_item_insert_after_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_tool_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + item2 = elm_controlbar_tool_item_insert_after(controlbar, NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + + if (item2) { + tet_infoline("elm_controlbar_tool_item_insert_after() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_before_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_before_func new file mode 100755 index 0000000..a4fdd5d Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_before_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_before_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_before_func.c new file mode 100644 index 0000000..e77ce4b --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_insert_before_func.c @@ -0,0 +1,112 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_tool_item_insert_before_func_01(void); +static void utc_UIFW_elm_controlbar_tool_item_insert_before_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_tool_item_insert_before_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_tool_item_insert_before_func_02, NEGATIVE_TC_IDX }, + { NULL, 0 } +}; + +static void startup(void) +{ + tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ "); + elm_init(0, NULL); + main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC); + evas_object_show(main_win); + + controlbar = elm_controlbar_add(main_win); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_tool_item_insert_before() + */ +static void utc_UIFW_elm_controlbar_tool_item_insert_before_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_tool_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + item2 = elm_controlbar_tool_item_insert_before(controlbar, item, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + + if (!item2) { + tet_infoline("elm_controlbar_tool_item_insert_before() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_tool_item_insert_before() + */ +static void utc_UIFW_elm_controlbar_tool_item_insert_before_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + Elm_Controlbar_Item *item2 = NULL; + item = elm_controlbar_tool_item_append(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + item2 = elm_controlbar_tool_item_insert_before(controlbar, NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + + if (item2) { + tet_infoline("elm_controlbar_tool_item_insert_before() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_prepend_func b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_prepend_func new file mode 100755 index 0000000..a3c054e Binary files /dev/null and b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_prepend_func differ diff --git a/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_prepend_func.c b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_prepend_func.c new file mode 100644 index 0000000..eef04d0 --- /dev/null +++ b/TC/elm_ts/controlbar/utc_UIFW_elm_controlbar_tool_item_prepend_func.c @@ -0,0 +1,108 @@ +#include +#include + +// Definitions +// For checking the result of the positive test case. +#define TET_CHECK_PASS(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err == (x1)) \ + { \ + tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + +// For checking the result of the negative test case. +#define TET_CHECK_FAIL(x1, y...) \ +{ \ + Evas_Object *err = y; \ + if (err != (x1)) \ + { \ + tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \ + tet_result(TET_FAIL); \ + return; \ + } \ +} + + +Evas_Object *main_win; +Evas_Object *controlbar; + +static void startup(void); +static void cleanup(void); + +void (*tet_startup)(void) = startup; +void (*tet_cleanup)(void) = cleanup; + +static void utc_UIFW_elm_controlbar_tool_item_prepend_func_01(void); +static void utc_UIFW_elm_controlbar_tool_item_prepend_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_controlbar_tool_item_prepend_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_controlbar_tool_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); + + controlbar = elm_controlbar_add(main_win); +} + +static void cleanup(void) +{ + if ( NULL != main_win ) { + evas_object_del(main_win); + main_win = NULL; + } + if ( NULL != controlbar ) { + evas_object_del(controlbar); + controlbar = NULL; + } + + elm_shutdown(); + tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ "); +} + +/** + * @brief Positive test case of elm_controlbar_tool_item_prepend() + */ +static void utc_UIFW_elm_controlbar_tool_item_prepend_func_01(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_tool_item_prepend(controlbar, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + + if (!item) { + tet_infoline("elm_controlbar_tool_item_prepend() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_controlbar_tool_item_prepend() + */ +static void utc_UIFW_elm_controlbar_tool_item_prepend_func_02(void) +{ + Elm_Controlbar_Item *item = NULL; + item = elm_controlbar_tool_item_prepend(NULL, CONTROLBAR_SYSTEM_ICON_SONGS, "Songs", NULL, NULL); + + if (item) { + tet_infoline("elm_controlbar_tool_item_prepend() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/tet_scen_arm b/TC/tet_scen_arm index 4c0cc99..0823d06 100644 --- a/TC/tet_scen_arm +++ b/TC/tet_scen_arm @@ -26,6 +26,8 @@ elm :include:/elm_ts/radio/tslist :include:/elm_ts/toggle/tslist :include:/elm_ts/panes/tslist + :include:/elm_ts/controlbar/tslist + #yhkim ch diff --git a/TC/tet_scen_i686 b/TC/tet_scen_i686 index c189b0f..fcb345a 100755 --- a/TC/tet_scen_i686 +++ b/TC/tet_scen_i686 @@ -29,6 +29,7 @@ elm :include:/elm_ts/radio/tslist :include:/elm_ts/toggle/tslist :include:/elm_ts/panes/tslist + :include:/elm_ts/controlbar/tslist #yhkim