From 0d8f0302c947d170b35ba63cad13e605b266acd8 Mon Sep 17 00:00:00 2001 From: Prince Kumar Dubey Date: Wed, 22 Sep 2010 17:39:30 +0530 Subject: [PATCH] [Scroller/TC] TestCases Added. --- TC/elm_ts/scroller/Makefile | 46 +++++++ TC/elm_ts/scroller/tc_gen.sh | 32 +++++ TC/elm_ts/scroller/tslist | 23 ++++ TC/elm_ts/scroller/utc_MODULE_API_func.c.in | 104 ++++++++++++++ .../utc_UIFW_elm_smart_scroller_add_func.c | 104 ++++++++++++++ ...IFW_elm_smart_scroller_bounce_allow_get_func .c | 122 +++++++++++++++++ ...UIFW_elm_smart_scroller_bounce_allow_set_func.c | 125 +++++++++++++++++ ...tc_UIFW_elm_smart_scroller_child_pos_get_func.c | 123 +++++++++++++++++ ...tc_UIFW_elm_smart_scroller_child_pos_set_func.c | 122 +++++++++++++++++ ...IFW_elm_smart_scroller_child_region_show_func.c | 152 +++++++++++++++++++++ .../utc_UIFW_elm_smart_scroller_child_set_func.c | 118 ++++++++++++++++ ...m_smart_scroller_child_viewport_size_get_func.c | 121 ++++++++++++++++ ..._UIFW_elm_smart_scroller_edje_object_get_func.c | 125 +++++++++++++++++ .../utc_UIFW_elm_smart_scroller_freeze_set_func.c | 110 +++++++++++++++ .../utc_UIFW_elm_smart_scroller_hold_set_func.c | 110 +++++++++++++++ ...tc_UIFW_elm_smart_scroller_page_move_set_func.c | 146 ++++++++++++++++++++ ...tc_UIFW_elm_smart_scroller_page_size_get_func.c | 125 +++++++++++++++++ ...tc_UIFW_elm_smart_scroller_page_size_set_func.c | 126 +++++++++++++++++ .../utc_UIFW_elm_smart_scroller_paging_set_func.c | 146 ++++++++++++++++++++ .../utc_UIFW_elm_smart_scroller_policy_get_func.c | 125 +++++++++++++++++ .../utc_UIFW_elm_smart_scroller_policy_set_func.c | 127 +++++++++++++++++ ..._UIFW_elm_smart_scroller_region_bring_in_func.c | 152 +++++++++++++++++++++ ...c_UIFW_elm_smart_scroller_single_dir_get_func.c | 122 +++++++++++++++++ ...c_UIFW_elm_smart_scroller_single_dir_set_func.c | 126 +++++++++++++++++ ...tc_UIFW_elm_smart_scroller_step_size_get_func.c | 125 +++++++++++++++++ ...tc_UIFW_elm_smart_scroller_step_size_set_func.c | 126 +++++++++++++++++ .../utc_UIFW_elm_smart_scroller_widget_set_func.c | 118 ++++++++++++++++ 27 files changed, 3101 insertions(+) create mode 100644 TC/elm_ts/scroller/Makefile create mode 100755 TC/elm_ts/scroller/tc_gen.sh create mode 100644 TC/elm_ts/scroller/tslist create mode 100755 TC/elm_ts/scroller/utc_MODULE_API_func.c.in create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_add_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_get_func .c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_get_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_region_show_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_viewport_size_get_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_edje_object_get_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_freeze_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_hold_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_move_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_get_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_paging_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_get_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_region_bring_in_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_get_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_get_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_set_func.c create mode 100755 TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_widget_set_func.c diff --git a/TC/elm_ts/scroller/Makefile b/TC/elm_ts/scroller/Makefile new file mode 100644 index 0000000..ab99168 --- /dev/null +++ b/TC/elm_ts/scroller/Makefile @@ -0,0 +1,46 @@ +CC ?= gcc + +TARGETS = utc_UIFW_elm_smart_scroller_add_func \ + utc_UIFW_elm_smart_scroller_bounce_allow_get_func \ + utc_UIFW_elm_smart_scroller_bounce_allow_set_func \ + utc_UIFW_elm_smart_scroller_child_pos_get_func \ + utc_UIFW_elm_smart_scroller_child_pos_set_func \ + utc_UIFW_elm_smart_scroller_child_region_show_func \ + utc_UIFW_elm_smart_scroller_child_set_func \ + utc_UIFW_elm_smart_scroller_child_viewport_size_get_func \ + utc_UIFW_elm_smart_scroller_edje_object_get_func \ + utc_UIFW_elm_smart_scroller_freeze_set_func \ + utc_UIFW_elm_smart_scroller_hold_set_func \ + utc_UIFW_elm_smart_scroller_page_move_set_func \ + utc_UIFW_elm_smart_scroller_page_size_get_func \ + utc_UIFW_elm_smart_scroller_page_size_set_func \ + utc_UIFW_elm_smart_scroller_paging_set_func \ + utc_UIFW_elm_smart_scroller_policy_get_func \ + utc_UIFW_elm_smart_scroller_policy_set_func \ + utc_UIFW_elm_smart_scroller_region_bring_in_func \ + utc_UIFW_elm_smart_scroller_single_dir_get_func \ + utc_UIFW_elm_smart_scroller_single_dir_set_func \ + utc_UIFW_elm_smart_scroller_step_size_get_func \ + utc_UIFW_elm_smart_scroller_step_size_set_func \ + utc_UIFW_elm_smart_scroller_widget_set_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/scroller/tc_gen.sh b/TC/elm_ts/scroller/tc_gen.sh new file mode 100755 index 0000000..a55200a --- /dev/null +++ b/TC/elm_ts/scroller/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/scroller/tslist b/TC/elm_ts/scroller/tslist new file mode 100644 index 0000000..9ffbcce --- /dev/null +++ b/TC/elm_ts/scroller/tslist @@ -0,0 +1,23 @@ +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_add_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_get_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_get_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_region_show_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_viewport_size_get_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_edje_object_get_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_freeze_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_hold_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_move_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_get_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_paging_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_get_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_region_bring_in_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_get_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_get_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_set_func +/elm_ts/scroller/utc_UIFW_elm_smart_scroller_widget_set_func diff --git a/TC/elm_ts/scroller/utc_MODULE_API_func.c.in b/TC/elm_ts/scroller/utc_MODULE_API_func.c.in new file mode 100755 index 0000000..6c6febe --- /dev/null +++ b/TC/elm_ts/scroller/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/scroller/utc_UIFW_elm_smart_scroller_add_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_add_func.c new file mode 100755 index 0000000..30a1513 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_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_smart_scroller_add_func_01(void); +static void utc_UIFW_elm_smart_scroller_add_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_add_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_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_smart_scroller_add() + */ +static void utc_UIFW_elm_smart_scroller_add_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + evas_object_show(scroll); + if (!scroll) { + tet_infoline("elm_smart_scroller_add() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_add() + */ +static void utc_UIFW_elm_smart_scroller_add_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll = elm_smart_scroller_add(NULL); + evas_object_show(scroll); + if (scroll) { + tet_infoline("elm_smart_scroller_add() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_get_func .c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_get_func .c new file mode 100755 index 0000000..6e6652f --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_get_func .c @@ -0,0 +1,122 @@ +#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_smart_scroller_bounce_allow_get_func_01(void); +static void utc_UIFW_elm_smart_scroller_bounce_allow_get_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_bounce_allow_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_bounce_allow_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_smart_scroller_bounce_allow_get() + */ +static void utc_UIFW_elm_smart_scroller_bounce_allow_get_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Eina_Bool x ,y; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_bounce_allow_get(scroll ,&x,&y); + if ((x==1) &&(y==1)){ + tet_result(TET_PASS); + return; + } + tet_infoline("elm_smart_scroller_bounce_allow_get() failed in positive test case"); + tet_result(TET_FAIL); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_bounce_allow_get() + */ +static void utc_UIFW_elm_smart_scroller_bounce_allow_get_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Eina_Bool x ,y; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_bounce_allow_get(NULL, &x,&y); + if ((x==1) &&(y==1)){ + tet_infoline("elm_smart_scroller_bounce_allow_get() failed in negative test case with the argument as NULL"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_set_func.c new file mode 100755 index 0000000..6e0fc8c --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_set_func.c @@ -0,0 +1,125 @@ +#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_smart_scroller_bounce_allow_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_bounce_allow_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_bounce_allow_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_bounce_allow_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_smart_scroller_bounce_allow_set() + */ +static void utc_UIFW_elm_smart_scroller_bounce_allow_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Eina_Bool x ,y; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_bounce_allow_set(scroll ,0,0); + elm_smart_scroller_bounce_allow_get(scroll ,&x,&y); + if ((x) &&(y)){ + tet_infoline("elm_smart_scroller_bounce_allow_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_bounce_allow_set() + */ +static void utc_UIFW_elm_smart_scroller_bounce_allow_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Eina_Bool x ,y,sx,sy; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_bounce_allow_get(scroll, &x,&y); + elm_smart_scroller_bounce_allow_set(NULL,1,1); + elm_smart_scroller_bounce_allow_get(scroll, &sx,&sy); + if ((sx==x)&&(sy==y)){ + tet_result(TET_PASS); + return; + } + tet_infoline("elm_smart_scroller_bounce_allow_set() failed in negative test case with the argument as NULL"); + tet_result(TET_FAIL); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_get_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_get_func.c new file mode 100755 index 0000000..d2d486d --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_get_func.c @@ -0,0 +1,123 @@ +#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_smart_scroller_child_pos_get_func_01(void); +static void utc_UIFW_elm_smart_scroller_child_pos_get_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_child_pos_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_child_pos_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_smart_scroller_child_pos_get() + */ +static void utc_UIFW_elm_smart_scroller_child_pos_get_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord px, py, x=100, y=100; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_pos_set(scroll, x, y); + elm_smart_scroller_child_pos_get(scroll, &px, &py); + if ((x==px)&&(y==py)) { + tet_result(TET_PASS); + return; + } + tet_infoline("elm_smart_scroller_child_pos_get() failed in positive test case"); + tet_result(TET_FAIL); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_child_pos_get() + */ +static void utc_UIFW_elm_smart_scroller_child_pos_get_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord px,py,qx,qy,x=100, y=100; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_pos_get(scroll, &px, &py); + elm_smart_scroller_child_pos_set(NULL, x, y); + elm_smart_scroller_child_pos_get(scroll, &qx, &qy); + if ((qx==px)&&(qy==py)) { + tet_result(TET_PASS); + return; + } + tet_infoline("elm_smart_scroller_child_pos_get() with parent as NULL failed in negative test case"); + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_set_func.c new file mode 100755 index 0000000..567450d --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_pos_set_func.c @@ -0,0 +1,122 @@ +#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_smart_scroller_child_pos_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_child_pos_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_child_pos_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_child_pos_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_smart_scroller_child_pos_set() + */ +static void utc_UIFW_elm_smart_scroller_child_pos_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord px, py, x=100, y=100; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_pos_set(scroll, x, y); + elm_smart_scroller_child_pos_get(scroll, &px, &py); + if ((x==px)&&(y==py)) { + tet_result(TET_PASS); + return; + } + tet_infoline("elm_smart_scroller_child_pos_set() failed in positive test case"); + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_child_pos_set() + */ +static void utc_UIFW_elm_smart_scroller_child_pos_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord px, py, x=100, y=100; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_pos_set(NULL, x, y); + elm_smart_scroller_child_pos_get(scroll, &px, &py); + if ((x==px)&&(y==py)) { + tet_infoline("elm_smart_scroller_child_pos_set() with parent as NULL failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_region_show_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_region_show_func.c new file mode 100755 index 0000000..cea52c6 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_region_show_func.c @@ -0,0 +1,152 @@ +#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_smart_scroller_child_region_show_func_01(void); +static void utc_UIFW_elm_smart_scroller_child_region_show_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_child_region_show_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_child_region_show_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_smart_scroller_child_region_show() + */ +static void utc_UIFW_elm_smart_scroller_child_region_show_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, + "This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled.This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled."); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_region_show(scroll,100,900,100,100); + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_child_region_show() + */ +static void utc_UIFW_elm_smart_scroller_child_region_show_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord px, py, x, y,w,h; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, + "This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled.This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled."); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + evas_object_geometry_get(scroll, &x, &y, &w, &h); + elm_smart_scroller_child_region_show(NULL,100,900,w,h); + evas_object_geometry_get(scroll, &px, &py, NULL, NULL); + if ((px==x)&&(py==y)) { + tet_result(TET_PASS); + return; + } + tet_infoline("elm_smart_scroller_child_region_show() failed in negative test case with the argument as NULL"); + tet_result(TET_FAIL); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_set_func.c new file mode 100755 index 0000000..52c23d0 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_set_func.c @@ -0,0 +1,118 @@ +#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_smart_scroller_child_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_child_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_child_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_child_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_smart_scroller_child_set() + */ +static void utc_UIFW_elm_smart_scroller_child_set_func_01(void) +{ + Evas_Object *scroll = NULL, *scroller=NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + scroller=elm_widget_parent_get(entry); + if (!scroller) { + tet_infoline("elm_smart_scroller_child_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_child_set() + */ +static void utc_UIFW_elm_smart_scroller_child_set_func_02(void) +{ + Evas_Object *scroll = NULL, *scroller=NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(NULL); + elm_smart_scroller_child_set(NULL,entry); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + scroller=elm_widget_parent_get(entry); + if (scroller) { + tet_infoline("elm_smart_scroller_child_set() with parent as NULL failed in neagative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_viewport_size_get_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_viewport_size_get_func.c new file mode 100755 index 0000000..251de13 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_child_viewport_size_get_func.c @@ -0,0 +1,121 @@ +#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_smart_scroller_child_viewport_size_get_func_01(void); +static void utc_UIFW_elm_smart_scroller_child_viewport_size_get_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_child_viewport_size_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_child_viewport_size_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_smart_scroller_child_viewport_size_get() + */ +static void utc_UIFW_elm_smart_scroller_child_viewport_size_get_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord w,h; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_viewport_size_get(scroll,&w,&h); + if (w!=232&&h!=392) { + + tet_infoline("elm_smart_scroller_child_viewport_size_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_child_viewport_size_get() + */ +static void utc_UIFW_elm_smart_scroller_child_viewport_size_get_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord w=0,h=0; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_viewport_size_get(NULL,&w,&h); + if ((w)&&(h)) { + tet_infoline("elm_smart_scroller_child_viewport_size_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_edje_object_get_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_edje_object_get_func.c new file mode 100755 index 0000000..a5c9b08 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_edje_object_get_func.c @@ -0,0 +1,125 @@ +#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_smart_scroller_edje_object_get_func_01(void); +static void utc_UIFW_elm_smart_scroller_edje_object_get_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_edje_object_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_edje_object_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_smart_scroller_edje_object_get() + */ +static void utc_UIFW_elm_smart_scroller_edje_object_get_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Object *scroll_object = NULL; + int x,y; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + scroll_object = elm_smart_scroller_edje_object_get(scroll,&x,&y); + if (!scroll_object) { + + tet_infoline("elm_smart_scroller_edje_object_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_edje_object_get() + */ +static void utc_UIFW_elm_smart_scroller_edje_object_get_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Object *scroll_object = NULL; + int x,y; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + scroll_object = elm_smart_scroller_edje_object_get(NULL,&x,&y); + if (scroll_object) { + tet_infoline("elm_smart_scroller_edje_object_get() failed in negative test case with the argument as NULL"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_freeze_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_freeze_set_func.c new file mode 100755 index 0000000..d67b580 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_freeze_set_func.c @@ -0,0 +1,110 @@ +#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_smart_scroller_freeze_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_freeze_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_freeze_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_freeze_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_smart_scroller_freeze_set() + */ +static void utc_UIFW_elm_smart_scroller_freeze_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_freeze_set(scroll,1); + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_freeze_set() + */ +static void utc_UIFW_elm_smart_scroller_freeze_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_freeze_set(scroll,0); + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_hold_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_hold_set_func.c new file mode 100755 index 0000000..9b821bb --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_hold_set_func.c @@ -0,0 +1,110 @@ +#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_smart_scroller_hold_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_hold_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_hold_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_hold_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_smart_scroller_hold_set() + */ +static void utc_UIFW_elm_smart_scroller_hold_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_hold_set(scroll,1); + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_hold_set() + */ +static void utc_UIFW_elm_smart_scroller_hold_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_hold_set(NULL,1); + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_move_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_move_set_func.c new file mode 100755 index 0000000..65cab59 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_move_set_func.c @@ -0,0 +1,146 @@ +#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_smart_scroller_page_move_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_page_move_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_page_move_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_page_move_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_smart_scroller_page_move_set() + */ +static void utc_UIFW_elm_smart_scroller_page_move_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, + "This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled.This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled." + ); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_page_move_set(scroll,1); + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_page_move_set() + */ +static void utc_UIFW_elm_smart_scroller_page_move_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, + "This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled.This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled." + ); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_page_move_set(NULL,1); + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_get_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_get_func.c new file mode 100755 index 0000000..a94174e --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_get_func.c @@ -0,0 +1,125 @@ +#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_smart_scroller_page_size_get_func_01(void); +static void utc_UIFW_elm_smart_scroller_page_size_get_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_page_size_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_page_size_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_smart_scroller_page_size_get() + */ +static void utc_UIFW_elm_smart_scroller_page_size_get_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord x,y,sx=450,sy=750; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_page_size_set(scroll,sx,sy); + elm_smart_scroller_page_size_get(scroll,&x,&y); + if ((x!=sx)&&(y!=sy)) { + + tet_infoline("elm_smart_scroller_page_size_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_page_size_get() + */ +static void utc_UIFW_elm_smart_scroller_page_size_get_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord x=0,y=0,sx=450,sy=750; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_page_size_set(scroll,sx,sy); + elm_smart_scroller_page_size_get(NULL,&x,&y); + if ((x)&&(y)) { + tet_infoline("elm_smart_scroller_page_size_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_set_func.c new file mode 100755 index 0000000..cbedf32 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_page_size_set_func.c @@ -0,0 +1,126 @@ +#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_smart_scroller_page_size_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_page_size_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_page_size_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_page_size_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_smart_scroller_page_size_set() + */ +static void utc_UIFW_elm_smart_scroller_page_size_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord x,y,sx=450,sy=750,px,py; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_page_size_get(scroll,&x,&y); + elm_smart_scroller_page_size_set(scroll,sx,sy); + elm_smart_scroller_page_size_get(scroll,&px,&py); + if ((px!=sx)&&(py!=sy)) { + tet_infoline("elm_smart_scroller_page_size_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_page_size_set() + */ +static void utc_UIFW_elm_smart_scroller_page_size_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord x,y,sx=450,sy=750,px,py; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_page_size_get(scroll,&x,&y); + elm_smart_scroller_page_size_set(NULL,sx,sy); + elm_smart_scroller_page_size_get(scroll,&px,&py); + if ((px!=x)&&(py!=y)) { + tet_infoline("elm_smart_scroller_page_size_set() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_paging_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_paging_set_func.c new file mode 100755 index 0000000..f40d582 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_paging_set_func.c @@ -0,0 +1,146 @@ +#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_smart_scroller_paging_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_paging_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_paging_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_paging_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_smart_scroller_paging_set() + */ +static void utc_UIFW_elm_smart_scroller_paging_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, + "This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled.This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled." + ); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_paging_set(scroll,0.5,0.5); + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_paging_set() + */ +static void utc_UIFW_elm_smart_scroller_paging_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, + "This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled.This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled." + ); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_paging_set(NULL,0.5,0.5); + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_get_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_get_func.c new file mode 100755 index 0000000..645a4ac --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_get_func.c @@ -0,0 +1,125 @@ +#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_smart_scroller_policy_get_func_01(void); +static void utc_UIFW_elm_smart_scroller_policy_get_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_policy_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_policy_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_smart_scroller_policy_get() + */ +static void utc_UIFW_elm_smart_scroller_policy_get_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + int x,y; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_policy_set(scroll,ELM_SCROLLER_POLICY_ON,ELM_SCROLLER_POLICY_ON); + elm_smart_scroller_policy_get(scroll,&x,&y); + if ((x!=1)&&(y!=1)) { + tet_infoline("elm_smart_scroller_policy_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_policy_get() + */ +static void utc_UIFW_elm_smart_scroller_policy_get_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + int x=0,y=0; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_policy_set(scroll,ELM_SCROLLER_POLICY_ON,ELM_SCROLLER_POLICY_ON); + elm_smart_scroller_policy_get(NULL,&x,&y); + if ((x)&&(y)) { + + tet_infoline("elm_smart_scroller_policy_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_set_func.c new file mode 100755 index 0000000..ed10622 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_policy_set_func.c @@ -0,0 +1,127 @@ +#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_smart_scroller_policy_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_policy_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_policy_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_policy_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_smart_scroller_policy_set() + */ +static void utc_UIFW_elm_smart_scroller_policy_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + int x,y,sx,sy; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e);; + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_policy_get(scroll,&x,&y); + elm_smart_scroller_policy_set(scroll,ELM_SCROLLER_POLICY_ON,ELM_SCROLLER_POLICY_ON); + elm_smart_scroller_policy_get(scroll,&sx,&sy); + if ((sx!=1)&&(sy!=1)) { + tet_infoline("elm_smart_scroller_policy_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_policy_set() + */ +static void utc_UIFW_elm_smart_scroller_policy_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + int x,y,sx,sy; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_policy_get(scroll,&x,&y); + elm_smart_scroller_policy_set(NULL,ELM_SCROLLER_POLICY_OFF,ELM_SCROLLER_POLICY_OFF); + elm_smart_scroller_policy_get(scroll,&sx,&sy); + if ((sx!=x)&&(sy!=y)) { + + tet_infoline("elm_smart_scroller_policy_set() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_region_bring_in_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_region_bring_in_func.c new file mode 100755 index 0000000..ce89da5 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_region_bring_in_func.c @@ -0,0 +1,152 @@ +#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_smart_scroller_region_bring_in_func_01(void); +static void utc_UIFW_elm_smart_scroller_region_bring_in_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_region_bring_in_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_region_bring_in_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_smart_scroller_region_bring_in() + */ +static void utc_UIFW_elm_smart_scroller_region_bring_in_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, + "This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled.This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled."); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_region_bring_in(scroll,100,900,NULL,NULL); + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_region_bring_in() + */ +static void utc_UIFW_elm_smart_scroller_region_bring_in_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord px, py, x, y,w,h; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, + "This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled.This is a multi-line entry at the bottom
" + "This can contain more than 1 line of text and be " + "scrolled around to allow for entering of lots of " + "content. It is also to test to see that autoscroll " + "moves to the right part of a larger multi-line " + "text entry that is inside of a scroller than can be " + "scrolled around, thus changing the expected position " + "as well as cursor changes updating auto-scroll when " + "it is enabled."); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + evas_object_geometry_get(scroll, &x, &y, &w, &h); + elm_smart_scroller_region_bring_in(NULL,100,900,w,h); + evas_object_geometry_get(scroll, &px, &py, NULL, NULL); + if ((px!=x)&&(py!=y)) { + tet_infoline("elm_smart_scroller_region_bring_in() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_get_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_get_func.c new file mode 100755 index 0000000..9898488 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_get_func.c @@ -0,0 +1,122 @@ +#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_smart_scroller_single_dir_get_func_01(void); +static void utc_UIFW_elm_smart_scroller_single_dir_get_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_single_dir_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_single_dir_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_smart_scroller_single_dir_get() + */ +static void utc_UIFW_elm_smart_scroller_single_dir_get_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Eina_Bool x; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + x = elm_smart_scroller_single_dir_get(scroll); + if(x!=1) { + tet_infoline("elm_smart_scroller_single_dir_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_single_dir_get() + */ +static void utc_UIFW_elm_smart_scroller_single_dir_get_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Eina_Bool x; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + x = elm_smart_scroller_single_dir_get(NULL); + if (x==1) { + tet_infoline("elm_smart_scroller_single_dir_get() failed in negative test case with the argument as NULL"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_set_func.c new file mode 100755 index 0000000..3324386 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_single_dir_set_func.c @@ -0,0 +1,126 @@ +#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_smart_scroller_single_dir_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_single_dir_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_single_dir_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_single_dir_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_smart_scroller_single_dir_set() + */ +static void utc_UIFW_elm_smart_scroller_single_dir_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Eina_Bool x; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + elm_smart_scroller_single_dir_set(scroll,1); + x = elm_smart_scroller_single_dir_get(scroll); + if (x!=1) { + tet_infoline("elm_smart_scroller_single_dir_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_single_dir_set() + */ +static void utc_UIFW_elm_smart_scroller_single_dir_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Eina_Bool x , sx; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + x = elm_smart_scroller_single_dir_get(scroll); + elm_smart_scroller_single_dir_set(NULL, 0); + sx = elm_smart_scroller_single_dir_get(scroll); + if (sx!=x) { + + tet_infoline("elm_smart_scroller_single_dir_set() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_get_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_get_func.c new file mode 100755 index 0000000..498e822 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_get_func.c @@ -0,0 +1,125 @@ +#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_smart_scroller_step_size_get_func_01(void); +static void utc_UIFW_elm_smart_scroller_step_size_get_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_step_size_get_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_step_size_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_smart_scroller_step_size_get() + */ +static void utc_UIFW_elm_smart_scroller_step_size_get_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord x,y,sx=50,sy=50; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_step_size_set(scroll,sx,sy); + elm_smart_scroller_step_size_get(scroll,&x,&y); + if ((x!=sx)&&(y!=sy)) { + tet_infoline("elm_smart_scroller_step_size_get() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_step_size_get() + */ +static void utc_UIFW_elm_smart_scroller_step_size_get_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord x=0,y=0,sx=50,sy=50; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_step_size_set(scroll,sx,sy); + elm_smart_scroller_step_size_get(NULL,&x,&y); + if ((x)&&(y)) { + + tet_infoline("elm_smart_scroller_step_size_get() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_set_func.c new file mode 100755 index 0000000..5348316 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_step_size_set_func.c @@ -0,0 +1,126 @@ +#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_smart_scroller_step_size_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_step_size_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_step_size_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_step_size_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_smart_scroller_step_size_set() + */ +static void utc_UIFW_elm_smart_scroller_step_size_set_func_01(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord x,y,sx=50,sy=50,px,py; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_step_size_get(scroll,&x,&y); + elm_smart_scroller_step_size_set(scroll,sx,sy); + elm_smart_scroller_step_size_get(scroll,&px,&py); + if ((px!=sx)&&(py!=sy)) { + tet_infoline("elm_smart_scroller_step_size_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_step_size_set() + */ +static void utc_UIFW_elm_smart_scroller_step_size_set_func_02(void) +{ + Evas_Object *scroll = NULL; + Evas_Object *entry = NULL; + Evas_Coord x,y,sx=50,sy=50,px,py; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + elm_smart_scroller_child_set( scroll,entry); + elm_entry_entry_set(entry, "This is a multi-line entry "); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_step_size_get(scroll,&x,&y); + elm_smart_scroller_step_size_set(NULL,sx,sy); + elm_smart_scroller_step_size_get(scroll,&px,&py); + if ((px!=x)&&(py!=y)) { + tet_infoline("elm_smart_scroller_step_size_set() failed in negative test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} diff --git a/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_widget_set_func.c b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_widget_set_func.c new file mode 100755 index 0000000..d9b22c8 --- /dev/null +++ b/TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_widget_set_func.c @@ -0,0 +1,118 @@ +#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_smart_scroller_widget_set_func_01(void); +static void utc_UIFW_elm_smart_scroller_widget_set_func_02(void); + +enum { + POSITIVE_TC_IDX = 0x01, + NEGATIVE_TC_IDX, +}; + +struct tet_testlist tet_testlist[] = { + { utc_UIFW_elm_smart_scroller_widget_set_func_01, POSITIVE_TC_IDX }, + { utc_UIFW_elm_smart_scroller_widget_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_smart_scroller_widget_set() + */ +static void utc_UIFW_elm_smart_scroller_widget_set_func_01(void) +{ + Evas_Object *scroll = NULL, *scroller=NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(main_win); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_widget_set( scroll,entry); + scroller=elm_widget_parent_get(entry); + if (!scroller) { + tet_infoline("elm_smart_scroller_widget_set() failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} + +/** + * @brief Negative test case of ug_init elm_smart_scroller_widget_set() + */ +static void utc_UIFW_elm_smart_scroller_widget_set_func_02(void) +{ + Evas_Object *scroll = NULL, *scroller=NULL; + Evas_Object *entry = NULL; + Evas *e; + e = evas_object_evas_get(main_win); + scroll= elm_smart_scroller_add(e); + entry = elm_entry_add(NULL); + evas_object_show(scroll); + evas_object_show(entry); + evas_object_resize(scroll,240,400); + evas_object_resize(entry,240,400); + elm_smart_scroller_widget_set(NULL,entry); + scroller=elm_widget_parent_get(entry); + if (scroller) { + tet_infoline("elm_smart_scroller_widget_set() with parent as NULL failed in positive test case"); + tet_result(TET_FAIL); + return; + } + tet_result(TET_PASS); +} -- 2.7.4