[Scroller/TC] File name renamed.
authorPrince Kumar Dubey <prince.dubey@samsung.com>
Wed, 22 Sep 2010 12:16:33 +0000 (17:46 +0530)
committerPrince Kumar Dubey <prince.dubey@samsung.com>
Wed, 22 Sep 2010 12:16:33 +0000 (17:46 +0530)
TC/elm_ts/scroller/utc_UIFW_elm_smart_scroller_bounce_allow_get_func.c [new file with mode: 0755]
TC/tet_scen_arm
TC/tet_scen_i686

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 (executable)
index 0000000..6e6652f
--- /dev/null
@@ -0,0 +1,122 @@
+#include <tet_api.h>\r
+#include <Elementary.h>\r
+\r
+// Definitions\r
+// For checking the result of the positive test case.\r
+#define TET_CHECK_PASS(x1, y...) \\r
+{ \\r
+       Evas_Object *err = y; \\r
+       if (err == (x1)) \\r
+               { \\r
+                       tet_printf("[TET_CHECK_PASS]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+                       tet_result(TET_FAIL); \\r
+                       return; \\r
+               } \\r
+}\r
+\r
+// For checking the result of the negative test case.\r
+#define TET_CHECK_FAIL(x1, y...) \\r
+{ \\r
+       Evas_Object *err = y; \\r
+       if (err != (x1)) \\r
+               { \\r
+                       tet_printf("[TET_CHECK_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__); \\r
+                       tet_result(TET_FAIL); \\r
+                       return; \\r
+               } \\r
+}\r
+\r
+\r
+Evas_Object *main_win;\r
+\r
+static void startup(void);\r
+static void cleanup(void);\r
+\r
+void (*tet_startup)(void) = startup;\r
+void (*tet_cleanup)(void) = cleanup;\r
+\r
+static void utc_UIFW_elm_smart_scroller_bounce_allow_get_func_01(void);\r
+static void utc_UIFW_elm_smart_scroller_bounce_allow_get_func_02(void);\r
+\r
+enum {\r
+       POSITIVE_TC_IDX = 0x01,\r
+       NEGATIVE_TC_IDX,\r
+};\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       { utc_UIFW_elm_smart_scroller_bounce_allow_get_func_01, POSITIVE_TC_IDX },\r
+       { utc_UIFW_elm_smart_scroller_bounce_allow_get_func_02, NEGATIVE_TC_IDX },\r
+       { NULL, 0 }\r
+};\r
+\r
+static void startup(void)\r
+{\r
+       tet_infoline("[[ TET_MSG ]]:: ============ Startup ============ ");\r
+       elm_init(0, NULL);\r
+       main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);\r
+       evas_object_show(main_win);     \r
+}\r
+\r
+static void cleanup(void)\r
+{\r
+       if ( NULL != main_win ) {\r
+               evas_object_del(main_win);\r
+               main_win = NULL;\r
+       }\r
+       elm_shutdown();\r
+       tet_infoline("[[ TET_MSG ]]:: ============ Cleanup ============ ");\r
+}\r
+\r
+/**\r
+ * @brief Positive test case of elm_smart_scroller_bounce_allow_get()\r
+ */\r
+static void utc_UIFW_elm_smart_scroller_bounce_allow_get_func_01(void)\r
+{\r
+       Evas_Object *scroll = NULL;\r
+       Evas_Object *entry = NULL;      \r
+    Eina_Bool x ,y;\r
+    Evas *e;\r
+       e = evas_object_evas_get(main_win);\r
+       scroll= elm_smart_scroller_add(e);\r
+       entry = elm_entry_add(main_win);\r
+       evas_object_show(scroll);       \r
+       evas_object_show(entry);\r
+       evas_object_resize(scroll,240,400);\r
+       evas_object_resize(entry,240,400);\r
+    elm_smart_scroller_child_set( scroll,entry);\r
+       elm_entry_entry_set(entry, "This is a multi-line entry ");      \r
+       elm_smart_scroller_bounce_allow_get(scroll ,&x,&y);\r
+       if ((x==1) &&(y==1)){           \r
+               tet_result(TET_PASS);\r
+               return;\r
+       }\r
+       tet_infoline("elm_smart_scroller_bounce_allow_get() failed in positive test case");\r
+       tet_result(TET_FAIL);\r
+}\r
+\r
+/**\r
+ * @brief Negative test case of ug_init elm_smart_scroller_bounce_allow_get()\r
+ */\r
+static void utc_UIFW_elm_smart_scroller_bounce_allow_get_func_02(void)\r
+{\r
+       Evas_Object *scroll = NULL;\r
+       Evas_Object *entry = NULL;      \r
+    Eina_Bool x ,y;\r
+    Evas *e;\r
+       e = evas_object_evas_get(main_win);\r
+       scroll= elm_smart_scroller_add(e);\r
+       entry = elm_entry_add(main_win);\r
+       evas_object_show(scroll);       \r
+       evas_object_show(entry);\r
+       evas_object_resize(scroll,240,400);\r
+       evas_object_resize(entry,240,400);\r
+    elm_smart_scroller_child_set( scroll,entry);\r
+       elm_entry_entry_set(entry, "This is a multi-line entry ");      \r
+       elm_smart_scroller_bounce_allow_get(NULL, &x,&y);\r
+       if ((x==1) &&(y==1)){\r
+           tet_infoline("elm_smart_scroller_bounce_allow_get() failed in negative test case with the argument as NULL");\r
+           tet_result(TET_FAIL);       \r
+               return;\r
+       }\r
+       tet_result(TET_PASS);\r
+}\r
index 0823d06..0826728 100644 (file)
@@ -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
index fcb345a..71f8d77 100755 (executable)
@@ -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