From: Prince Kumar Dubey Date: Wed, 22 Sep 2010 12:16:33 +0000 (+0530) Subject: [Scroller/TC] File name renamed. X-Git-Tag: origin~145 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbc0ce435381212d88edba178ee96ae629b1e386;p=framework%2Fuifw%2Felementary.git [Scroller/TC] File name renamed. --- 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/tet_scen_arm b/TC/tet_scen_arm index 0823d06..0826728 100644 --- a/TC/tet_scen_arm +++ b/TC/tet_scen_arm @@ -27,6 +27,9 @@ elm :include:/elm_ts/toggle/tslist :include:/elm_ts/panes/tslist :include:/elm_ts/controlbar/tslist + :include:/elm_ts/segmentcontrol/tslist + :include:/elm_ts/scroller/tslist + #yhkim diff --git a/TC/tet_scen_i686 b/TC/tet_scen_i686 index fcb345a..71f8d77 100755 --- a/TC/tet_scen_i686 +++ b/TC/tet_scen_i686 @@ -30,6 +30,8 @@ elm :include:/elm_ts/toggle/tslist :include:/elm_ts/panes/tslist :include:/elm_ts/controlbar/tslist + :include:/elm_ts/scroller/tslist + :include:/elm_ts/segmentcontrol/tslist #yhkim