Refactoring: Disabled error pop-ups to avoid focus related TC failures 18/193218/1
authorManoj Kumar <manoj.km@samsung.com>
Fri, 16 Nov 2018 06:46:01 +0000 (12:16 +0530)
committerManoj Kumar <manoj.km@samsung.com>
Fri, 16 Nov 2018 06:48:55 +0000 (12:18 +0530)
Merged TCs to reduce duplicate test operations.

Change-Id: Id4786e935ed10feb2ef41e3a7db7620df9cae1c5

19 files changed:
TC/elementary/elm_object/tslist
TC/elementary/elm_object/tslist_fhub
TC/elementary/elm_object/tslist_mobile
TC/elementary/elm_object/tslist_tv
TC/elementary/elm_object/tslist_wear
TC/elementary/elm_object/utc_elm_object_focus_get.c [deleted file]
TC/elementary/elm_object/utc_elm_object_focus_get_set_next.c [new file with mode: 0644]
TC/elementary/elm_object/utc_elm_object_focus_next.c [deleted file]
TC/elementary/elm_object/utc_elm_object_focus_set.c [deleted file]
TC/elementary/entry/tslist
TC/elementary/entry/tslist_fhub
TC/elementary/entry/tslist_mobile
TC/elementary/entry/tslist_tv
TC/elementary/entry/tslist_wear
TC/elementary/entry/utc_elm_entry_selection_copy.c [deleted file]
TC/elementary/entry/utc_elm_entry_selection_cut.c [deleted file]
TC/elementary/entry/utc_elm_entry_selection_cut_copy_paste.c [new file with mode: 0644]
TC/elementary/entry/utc_elm_entry_selection_paste.c [deleted file]
TC/execute.sh

index 96a94712c17599ad666921a86f6956d40429faa9..01a0707a736a7b2a456e98b918b920ed5ccb457f 100644 (file)
@@ -1,7 +1,6 @@
 utc_elm_object_scroll_item_loop_enabled.c
 utc_elm_object_disabled_set.c
 utc_elm_object_disabled_get.c
-utc_elm_object_focus_set.c
 utc_elm_object_access_info_set.c
 utc_elm_object_access_info_get.c
 utc_elm_object_parent_widget_get.c
@@ -45,7 +44,7 @@ utc_elm_object_cursor_get.c
 utc_elm_object_cursor_unset.c
 utc_elm_object_cursor_style_set.c
 utc_elm_object_cursor_style_get.c
-utc_elm_object_focus_get.c
+utc_elm_object_focus_get_set_next.c
 utc_elm_object_focus_custom_chain_append.c
 utc_elm_object_focus_custom_chain_prepend.c
 utc_elm_object_focus_custom_chain_set.c
@@ -105,7 +104,6 @@ utc_elm_object_domain_part_text_translatable_set.c
 utc_elm_object_domain_translatable_part_text_set.c
 #utc_elm_object_domain_translatable_text_part_set.c
 utc_elm_object_focus_custom_chain_unset.c
-utc_elm_object_focus_next.c
 utc_elm_object_focus_next_object_get.c
 utc_elm_object_focus_next_object_set.c
 utc_elm_object_focused_object_get.c
index 360b0546ce9c83c80f51add50abb53469bdabb1c..0f1b47f5ca62a0909c6063f0d5137d52618a41cf 100644 (file)
@@ -1,7 +1,6 @@
 utc_elm_object_scroll_item_loop_enabled.c
 utc_elm_object_disabled_set.c
 utc_elm_object_disabled_get.c
-#utc_elm_object_focus_set.c
 utc_elm_object_access_info_set.c
 utc_elm_object_access_info_get.c
 utc_elm_object_parent_widget_get.c
@@ -45,7 +44,7 @@ utc_elm_object_cursor_get.c
 utc_elm_object_cursor_unset.c
 utc_elm_object_cursor_style_set.c
 utc_elm_object_cursor_style_get.c
-#utc_elm_object_focus_get.c
+#utc_elm_object_focus_get_set_next.c
 utc_elm_object_focus_custom_chain_append.c
 utc_elm_object_focus_custom_chain_prepend.c
 utc_elm_object_focus_custom_chain_set.c
@@ -105,7 +104,6 @@ utc_elm_object_domain_part_text_translatable_set.c
 utc_elm_object_domain_translatable_part_text_set.c
 #utc_elm_object_domain_translatable_text_part_set.c
 utc_elm_object_focus_custom_chain_unset.c
-#utc_elm_object_focus_next.c
 utc_elm_object_focus_next_object_get.c
 utc_elm_object_focus_next_object_set.c
 utc_elm_object_focused_object_get.c
index 1959a15019193aa3965440d74cf126d38b93cc04..8324bd6b856c3a4d018c347e51627557cad7024c 100644 (file)
@@ -1,7 +1,6 @@
 utc_elm_object_scroll_item_loop_enabled.c
 utc_elm_object_disabled_set.c
 utc_elm_object_disabled_get.c
-utc_elm_object_focus_set.c
 utc_elm_object_access_info_set.c
 utc_elm_object_access_info_get.c
 utc_elm_object_parent_widget_get.c
@@ -45,7 +44,7 @@ utc_elm_object_cursor_get.c
 utc_elm_object_cursor_unset.c
 utc_elm_object_cursor_style_set.c
 utc_elm_object_cursor_style_get.c
-utc_elm_object_focus_get.c
+utc_elm_object_focus_get_set_next.c
 utc_elm_object_focus_custom_chain_append.c
 utc_elm_object_focus_custom_chain_prepend.c
 utc_elm_object_focus_custom_chain_set.c
@@ -105,7 +104,6 @@ utc_elm_object_domain_part_text_translatable_set.c
 utc_elm_object_domain_translatable_part_text_set.c
 #utc_elm_object_domain_translatable_text_part_set.c
 utc_elm_object_focus_custom_chain_unset.c
-utc_elm_object_focus_next.c
 utc_elm_object_focus_next_object_get.c
 utc_elm_object_focus_next_object_set.c
 utc_elm_object_focused_object_get.c
index dc3c8884ef40c4414fa58c39155d06e497073034..31368953830602649989d0c1d47322cd6e6c8c9c 100644 (file)
@@ -1,7 +1,6 @@
 #utc_elm_object_scroll_item_loop_enabled.c
 utc_elm_object_disabled_set.c
 utc_elm_object_disabled_get.c
-utc_elm_object_focus_set.c
 utc_elm_object_access_info_set.c
 #utc_elm_object_access_info_get.c
 utc_elm_object_parent_widget_get.c
@@ -45,7 +44,7 @@ utc_elm_object_cursor_get.c
 utc_elm_object_cursor_unset.c
 utc_elm_object_cursor_style_set.c
 utc_elm_object_cursor_style_get.c
-utc_elm_object_focus_get.c
+utc_elm_object_focus_get_set_next.c
 utc_elm_object_focus_custom_chain_append.c
 utc_elm_object_focus_custom_chain_prepend.c
 utc_elm_object_focus_custom_chain_set.c
@@ -105,7 +104,6 @@ utc_elm_object_widget_check.c
 utc_elm_object_domain_translatable_part_text_set.c
 #utc_elm_object_domain_translatable_text_part_set.c
 utc_elm_object_focus_custom_chain_unset.c
-utc_elm_object_focus_next.c
 utc_elm_object_focus_next_object_get.c
 utc_elm_object_focus_next_object_set.c
 utc_elm_object_focused_object_get.c
index 6af418f6071e1ed7044481922675c05c6e2c0a4f..45edd573b17f9f0212b924c99b211ebd997de402 100644 (file)
@@ -1,7 +1,6 @@
 #utc_elm_object_scroll_item_loop_enabled.c
 utc_elm_object_disabled_set.c
 utc_elm_object_disabled_get.c
-utc_elm_object_focus_set.c
 utc_elm_object_access_info_set.c
 #utc_elm_object_access_info_get.c
 utc_elm_object_parent_widget_get.c
@@ -45,7 +44,7 @@ utc_elm_object_cursor_get.c
 utc_elm_object_cursor_unset.c
 utc_elm_object_cursor_style_set.c
 utc_elm_object_cursor_style_get.c
-utc_elm_object_focus_get.c
+utc_elm_object_focus_get_set_next.c
 utc_elm_object_focus_custom_chain_append.c
 utc_elm_object_focus_custom_chain_prepend.c
 utc_elm_object_focus_custom_chain_set.c
@@ -105,7 +104,6 @@ utc_elm_object_domain_part_text_translatable_set.c
 utc_elm_object_domain_translatable_part_text_set.c
 #utc_elm_object_domain_translatable_text_part_set.c
 utc_elm_object_focus_custom_chain_unset.c
-utc_elm_object_focus_next.c
 utc_elm_object_focus_next_object_get.c
 utc_elm_object_focus_next_object_set.c
 utc_elm_object_focused_object_get.c
diff --git a/TC/elementary/elm_object/utc_elm_object_focus_get.c b/TC/elementary/elm_object/utc_elm_object_focus_get.c
deleted file mode 100644 (file)
index 0820c8c..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-#include <check.h>
-#include "utc_util_elm_widget_create.h"
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL;
-
-#define WAIT_FOR(duration) \
-   do \
-     { \
-        if (ecore_timer_add(duration, _timer_cb, NULL) == NULL) \
-          { \
-             ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed (timer cannot be created for testing)..", __FILE__, __LINE__); \
-             return; \
-          } \
-        ecore_main_loop_begin(); \
-     } while (0);
-
-
-/**
- * @addtogroup elm_object
- * @{
- * @defgroup elm_object_focus_get elm_object_focus_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- */
-
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   elm_init(0, NULL);
-   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-   if (main_win == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
-        return;
-     }
-   evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _timer_cb(void *data)
-{
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-/**
- * @addtogroup elm_object_focus_get
- * @{
- * @objective Positive Test case checks if function call with valid values to get the whether the Elementary object
- * has the focus or not works properly and without segmentation fault
- * @n Input Data:
- * @li the Elementary object to operate on
- *
- * @procedure
- * @step 1 Run the application main loop
- * @step 2 Get the list of widgets
- * @step 3 Allow focusable for every widget in list
- * @step 4 Show every widget in list
- * @step 5 Traverse the list of widgets
- * @step 6 Get whether the Elementary object is focusable or not. If the object is unfocusable then ignore it and go to the next object
- * @step 7 Set focus to a given Elementary object
- * @step 8 Call elm_object_focus_get with valid value
- * @step 9 Unset focus to a given Elementary object
- * @step 10 Call elm_object_focus_get with valid value
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_object_focus_get_p)
-{
-   Eina_List *widgets = NULL, *l = NULL;
-   Evas_Object *obj = NULL;
-   Eina_Bool ret_focus = EINA_FALSE, is_object_focusable = EINA_TRUE, pass = EINA_FALSE;
-   char *widget_type = NULL;
-
-   if (main_win == NULL)
-     {
-        return;
-     }
-
-   widgets = utc_util_elm_not_container_widget_list_get(main_win);
-   if (widgets == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to get a list of widgets..", __FILE__, __LINE__);
-        return;
-     }
-
-   for (l = widgets; l; l = eina_list_next(l))
-     {
-        obj = (Evas_Object *) eina_list_data_get(l);
-        if (obj)
-          {
-             elm_object_focus_allow_set(obj, EINA_TRUE);
-             evas_object_show(obj);
-             widget_type = elm_object_widget_type_get(obj);
-             printf("[TEST_MSG]:: %s[%d] : Widget %s is testing...", __FILE__, __LINE__, widget_type);
-             is_object_focusable = elm_object_focus_allow_get(obj);
-             if (is_object_focusable == EINA_FALSE)
-               {
-                  printf("[TEST_MSG]:: %s[%d] : Widget %s can't be focused", __FILE__, __LINE__, widget_type);
-                  continue;
-               }
-             elm_object_focus_set(obj, EINA_TRUE);
-             WAIT_FOR(0.2)
-             ret_focus = elm_object_focus_get(obj);
-             if (ret_focus == EINA_FALSE)
-               {
-                  printf("[TEST_MSG]:: %s[%d] : Widget %s can't focus set", __FILE__, __LINE__, widget_type);
-                  continue;
-               }
-             elm_object_focus_set(obj, EINA_FALSE);
-             WAIT_FOR(0.2)
-             ret_focus = elm_object_focus_get(obj);
-             if (ret_focus == EINA_TRUE)
-               {
-                  printf("[TEST_MSG]:: %s[%d] : Widget %s can't focus unset", __FILE__, __LINE__, widget_type);
-                  continue;
-               }
-             pass = EINA_TRUE;
-             printf("[TEST_MSG]:: %s[%d] : Widget %s focused and unfocused. Test is ok", __FILE__, __LINE__, widget_type);
-          }
-     }
-   if (pass)
-     {
-        printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-     }
-   else
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to get any appropriate widget object..", __FILE__, __LINE__);
-     }
-}
-END_TEST
-
-/**
- * @addtogroup elm_object_focus_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the whether the Elementary object
- * has the focus or not works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the Elementary object to operate on
- *
- * @procedure
- * @step 1 Call elm_object_focus_get with invalid value instead of the Elementary object to operate on
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_object_focus_get_n)
-{
-   Evas_Object *obj = NULL;
-
-   if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_object_focus_get, obj))
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_object_focus_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_object_focus_get_p);
-   tcase_add_test(tcase, utc_elm_object_focus_get_n);
-   suite_add_tcase(suite, tcase);
-
-   return suite;
-}
-
-int
-main()
-{
-   int number_failed;
-
-   Suite *suite = test_suite();
-   SRunner *srunner = srunner_create(suite);
-   srunner_set_log(srunner, "utc_elm_object_focus_get.log");
-   srunner_set_xml(srunner, "utc_elm_object_focus_get.xml");
-   srunner_run_all(srunner, CK_NORMAL);
-   number_failed = srunner_ntests_failed(srunner);
-   srunner_free(srunner);
-
-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/TC/elementary/elm_object/utc_elm_object_focus_get_set_next.c b/TC/elementary/elm_object/utc_elm_object_focus_get_set_next.c
new file mode 100644 (file)
index 0000000..d00fb09
--- /dev/null
@@ -0,0 +1,277 @@
+#include <check.h>
+#include "utc_util_elm_widget_create.h"
+#include "../../utc_negative_unitest.h"
+
+#define WAIT_FOR(duration) \
+   do \
+     { \
+        if (ecore_timer_add(duration, _timer_cb, NULL) == NULL) \
+          { \
+             ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (timer cannot be created for testing)..", __FILE__, __LINE__); \
+          } \
+        ecore_main_loop_begin(); \
+     } while (0);
+
+static Evas_Object *main_win = NULL;
+
+/**
+ * @addtogroup elm_object
+ * @{
+ * @defgroup elm_object_focus_next elm_object_focus_next()
+ *
+ * @precondition
+ * @step 1 elm initialized with elm_init().
+ * @step 2 A window object created and showed.
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   elm_init(0, NULL);
+   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+   if (main_win == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+     }
+   evas_object_show(main_win);
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   ecore_main_loop_quit();
+   return EINA_FALSE;
+}
+
+/**
+ * @addtogroup elm_object_focus_get, elm_object_focus_set, elm_object_focus_next
+ * @{
+ * @objective Positive Test case checks if function call with valid values to unset/set focus to a given Elementary object
+ * @and get if the Elementary object has the focus or not. Also checks if focus to next object in object tree works properly.
+ * @n Input Data:
+ * @li the Elementary object to operate on.
+ * @li EINA_TRUE, EINA_FALSE as the flag's value to set/unset focus, ELM_FOCUS_NEXT focus direction.
+ *
+ * @procedure
+ * @step 1 Get widgets list.
+ * @step 2 Traverse the widgets list.
+ * @step 3 Allow focusable for every widget in list
+ * @step 4 Show every widget in list
+ * @step 5 Check if the Elementary object is focusable or not. If the object is unfocusable then ignore it and go to the next object
+ * @step 6 For given available widget, unset focus.
+ * @step 7 Check if the Elementary object has the focus or not.
+ * @step 8 For given available widget, set focus.
+ * @step 9 Check if the Elementary object has the focus or not.
+ * @step 10 For the focus object set focus next object with ELM_FOCUS_NEXT focus direction.
+ * @step 10 Check if next object which was set with specific focus direction is same as expected.
+ * @step 11 Give focus to next object with ELM_FOCUS_NEXT focus direction.
+ * @step 12 Check if next object has the focus or not.
+ *
+ * @passcondition: Test passes if the next object is focused.
+ * @}
+ */
+START_TEST(utc_elm_object_focus_get_set_next_p)
+{
+   Eina_List *widgets = NULL;
+   Eina_List *l = NULL;
+   Evas_Object *obj = NULL;
+   Eina_Bool ret_focus = EINA_FALSE, is_object_focusable = EINA_TRUE, pass = EINA_FALSE;
+   char *widget_type = NULL;
+
+   widgets = utc_util_elm_not_container_widget_list_get(main_win);
+   if (!widgets)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   Evas_Object *button_next = elm_button_add(main_win);
+   evas_object_show(button_next);
+
+   for (l = widgets; l; l = eina_list_next(l))
+     {
+        obj = (Evas_Object *) eina_list_data_get(l);
+        if (obj)
+          {
+             elm_object_focus_allow_set(obj, EINA_TRUE);
+             evas_object_show(obj);
+             widget_type = elm_object_widget_type_get(obj);
+             printf("[TEST_MSG]:: Widget %s is testing...\n", widget_type);
+             is_object_focusable = elm_object_focus_allow_get(obj);
+             if (is_object_focusable == EINA_FALSE)
+               {
+                  evas_object_del(obj);
+                  printf("[TEST_MSG]:: Widget %s can't be focused\n", widget_type);
+                  continue;
+               }
+             elm_object_focus_set(obj, EINA_FALSE);
+             WAIT_FOR(0.1)
+             ret_focus = elm_object_focus_get(obj);
+             if (ret_focus != EINA_FALSE)
+               {
+                  evas_object_del(obj);
+                  printf("[TEST_MSG]:: %s[%d] : Widget %s can't focus unset", __FILE__, __LINE__, widget_type);
+                  continue;
+               }
+             elm_object_focus_set(obj, EINA_TRUE);
+             WAIT_FOR(0.1)
+             ret_focus = elm_object_focus_get(obj);
+             if (ret_focus != EINA_TRUE)
+               {
+                  evas_object_del(obj);
+                  printf("[TEST_MSG]:: Widget %s can't focus set\n", widget_type);
+                  continue;
+               }
+             elm_object_focus_next_object_set(obj, button_next, ELM_FOCUS_NEXT);
+             if (elm_object_focus_next_object_get(obj, ELM_FOCUS_NEXT) != button_next)
+               {
+                  evas_object_del(obj);
+                  printf("[TEST_MSG]:: Widget %s can't set next object - button\n", widget_type);
+                  continue;
+               }
+             elm_object_focus_next(obj, ELM_FOCUS_NEXT);
+             WAIT_FOR(0.1)
+             if (!elm_object_focus_get(button_next))
+               {
+                  evas_object_del(obj);
+                  printf("[TEST_MSG]:: Widget %s can't set focus to the next object - button. Was set: %s\n", widget_type, elm_object_widget_type_get(elm_object_focused_object_get(main_win)));
+                  continue;
+               }
+             pass = EINA_TRUE;
+             printf("[TEST_MSG]:: Widget %s focused and set focus to next object - button. Test is ok\n", widget_type);
+          }
+        evas_object_del(obj);
+     }
+   evas_object_del(button_next);
+   eina_list_free(widgets);
+   if (pass)
+     {
+        printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+     }
+   else
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to get any appropriate widget object..", __FILE__, __LINE__);
+     }
+}
+END_TEST
+
+/**
+ * @addtogroup elm_object_focus_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the whether the Elementary object
+ * has the focus or not works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the Elementary object to operate on
+ *
+ * @procedure
+ * @step 1 Call elm_object_focus_get with invalid value instead of the Elementary object to operate on
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_object_focus_get_n)
+{
+   Evas_Object *obj = NULL;
+
+   if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_object_focus_get, obj))
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_object_focus_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set/unset focus to a given Elementary object
+ * works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the Elementary object to operate on
+ * @li EINA_TRUE as the flag's value to set/unset focus to a given Elementary object
+ *
+ * @procedure
+ * @step 1 Call elm_object_focus_set with invalid value instead of the Elementary object to operate on
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_object_focus_set_n)
+{
+   Evas_Object *obj = NULL;
+
+   CREATE_CHECKED_ARGS_ARRAY(1, 0)
+   UNITEST_FUNC_NEG_CA(elm_object_focus_set, obj, EINA_TRUE)
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_object_focus_next
+ * @{
+ * @objective Negative Test case : Give focus to next object of the NULL Elementary object.
+ * @n Input Data:
+ * @li NULL as the Elementary object;
+ * @li ELM_FOCUS_NEXT focus direction.
+ *
+ * @procedure
+ * @step 1 Try to give focus to next object of the NULL Elementary object.
+ *
+ * @passcondition: Return type of this API is void. Test passes if API completes successfully.
+ * @}
+ */
+START_TEST(utc_elm_object_focus_next_n)
+{
+   elm_object_focus_next(NULL, ELM_FOCUS_NEXT);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_object_focus_get_set_next");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_object_focus_get_set_next_p);
+   tcase_add_test(tcase, utc_elm_object_focus_get_n);
+   tcase_add_test(tcase, utc_elm_object_focus_set_n);
+   tcase_add_test(tcase, utc_elm_object_focus_next_n);
+   suite_add_tcase(suite, tcase);
+
+   return suite;
+}
+
+int
+main()
+{
+   int number_failed;
+
+   Suite *suite = test_suite();
+   SRunner *srunner = srunner_create(suite);
+   srunner_set_log(srunner, "utc_elm_object_focus_get_set_next.log");
+   srunner_set_xml(srunner, "utc_elm_object_focus_get_set_next.xml");
+   srunner_run_all(srunner, CK_NORMAL);
+   number_failed = srunner_ntests_failed(srunner);
+   srunner_free(srunner);
+
+   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/TC/elementary/elm_object/utc_elm_object_focus_next.c b/TC/elementary/elm_object/utc_elm_object_focus_next.c
deleted file mode 100644 (file)
index ee318dd..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-#include <check.h>
-#include "utc_util_elm_widget_create.h"
-
-#define WAIT_FOR(duration) \
-   do \
-     { \
-        if (ecore_timer_add(duration, _timer_cb, NULL) == NULL) \
-          { \
-             ck_abort_msg("[TEST_FAIL:: %s[%d] : Test has failed (timer cannot be created for testing)..", __FILE__, __LINE__); \
-             return; \
-          } \
-        ecore_main_loop_begin(); \
-     } while (0);
-
-Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_object
- * @{
- * @defgroup elm_object_focus_next elm_object_focus_next()
- *
- * @precondition
- * @step 1 elm initialized with elm_init().
- * @step 2 A window object created and showed.
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   elm_init(0, NULL);
-   elm_config_accel_preference_set("3d");
-   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-   evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
-   if (main_win)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _timer_cb(void *data)
-{
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-/**
- * @addtogroup elm_object_focus_next
- * @{
- * @objective Positive Test case 01: Give focus to next object in object tree.
- * @n Input Data:
- * @li the Elementary object;
- * @li ELM_FOCUS_NEXT focus direction.
- *
- * @procedure
- * @step 1 Get widgets list.
- * @step 2 Traverse the widgets list.
- * @step 3 For given available widget, set focus.
- * @step 4 For the focus object set focus next object with ELM_FOCUS_NEXT focus direction.
- * @step 5 Give focus to next object with ELM_FOCUS_NEXT focus direction.
- * @step 6 Get the whether next object has the focus or not.
- *
- * @passcondition: Test passes if the next object is focused.
- * @}
- */
-START_TEST(utc_UIFW_elm_object_focus_next_p_1)
-{
-   Eina_List *widgets = NULL;
-   Eina_List *l = NULL;
-   Evas_Object *obj = NULL;
-   Eina_Bool ret_focus = EINA_FALSE, is_object_focusable = EINA_TRUE, pass = EINA_FALSE;
-   char *widget_type = NULL;
-
-   widgets = utc_util_elm_not_container_widget_list_get(main_win);
-   if (!widgets)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   Evas_Object *button_next = elm_button_add(main_win);
-   evas_object_show(button_next);
-
-   for (l = widgets; l; l = eina_list_next(l))
-     {
-        obj = (Evas_Object *) eina_list_data_get(l);
-        if (obj)
-          {
-             elm_object_focus_allow_set(obj, EINA_TRUE);
-             evas_object_show(obj);
-             widget_type = elm_object_widget_type_get(obj);
-             printf("Widget %s is testing...\n", widget_type);
-             is_object_focusable = elm_object_focus_allow_get(obj);
-             if (is_object_focusable == EINA_FALSE)
-               {
-                  printf("Widget %s can't be focused\n", widget_type);
-                  continue;
-               }
-             elm_object_focus_set(obj, EINA_TRUE);
-             WAIT_FOR(0.2)
-             ret_focus = elm_object_focus_get(obj);
-             if (ret_focus == EINA_FALSE)
-               {
-                  printf("Widget %s can't focus set\n", widget_type);
-                  continue;
-               }
-
-             elm_object_focus_next_object_set(obj, button_next, ELM_FOCUS_NEXT);
-             if (elm_object_focus_next_object_get(obj, ELM_FOCUS_NEXT) != button_next)
-               {
-                  printf("Widget %s can't set next object - button\n", widget_type);
-                  continue;
-               }
-
-             elm_object_focus_next(obj, ELM_FOCUS_NEXT);
-             WAIT_FOR(0.25)
-             if (!elm_object_focus_get(button_next))
-               {
-                  /*   evas_object_del(obj);
-                  eina_list_free(widgets);
-                  ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..Can't do next focus", __FILE__, __LINE__);
-                  return;*/
-                  printf("Widget %s can't set focus to the next object - button. Was set: %s\n", widget_type, elm_object_widget_type_get(elm_object_focused_object_get(main_win)));
-                  continue;
-               }
-             pass = EINA_TRUE;
-             printf("Widget %s focused and set focus to next object - button. Test is ok\n", widget_type);
-          }
-        evas_object_del(obj);
-     }
-
-   eina_list_free(widgets);
-   if (pass)
-     {
-        printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-     }
-   else
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to get any appropriate widget object..", __FILE__, __LINE__);
-     }
-}
-END_TEST
-
-/**
- * @addtogroup elm_object_focus_next
- * @{
- * @objective Negative Test case 01: Give focus to next object of the NULL Elementary object.
- * @n Input Data:
- * @li NULL as the Elementary object;
- * @li ELM_FOCUS_NEXT focus direction.
- *
- * @procedure
- * @step 1 Try to give focus to next object of the NULL Elementary object.
- *
- * @passcondition: Return type of this API is void. Test passes if API completes successfully.
- * @}
- */
-START_TEST(utc_UIFW_elm_object_focus_next_n_1)
-{
-   elm_object_focus_next(NULL, ELM_FOCUS_NEXT);
-
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-   return;
-}
-END_TEST
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_object_focus_next");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_UIFW_elm_object_focus_next_p_1);
-   tcase_add_test(tcase, utc_UIFW_elm_object_focus_next_n_1);
-   suite_add_tcase(suite, tcase);
-
-   return suite;
-}
-
-int
-main()
-{
-   int number_failed;
-
-   Suite *suite = test_suite();
-   SRunner *srunner = srunner_create(suite);
-   srunner_set_log(srunner, "utc_elm_object_focus_next.log");
-   srunner_set_xml(srunner, "utc_elm_object_focus_next.xml");
-   srunner_run_all(srunner, CK_NORMAL);
-   number_failed = srunner_ntests_failed(srunner);
-   srunner_free(srunner);
-
-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/TC/elementary/elm_object/utc_elm_object_focus_set.c b/TC/elementary/elm_object/utc_elm_object_focus_set.c
deleted file mode 100644 (file)
index bda4ae1..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-#include <check.h>
-#include "utc_util_elm_widget_create.h"
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL;
-
-#define WAIT_FOR(duration) \
-   do \
-     { \
-        if (ecore_timer_add(duration, _timer_cb, NULL) == NULL) \
-          { \
-             ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed (timer cannot be created for testing)..", __FILE__, __LINE__); \
-             return; \
-          } \
-        ecore_main_loop_begin(); \
-     } while (0);
-
-
-/**
- * @addtogroup elm_object
- * @{
- * @defgroup elm_object_focus_set elm_object_focus_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create and show main window
- */
-
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   elm_init(0, NULL);
-   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-   if (main_win == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
-        return;
-     }
-   evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-static Eina_Bool _timer_cb(void *data)
-{
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-/**
- * @addtogroup elm_object_focus_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set/unset focus to a given Elementary object
- * works properly and without segmentation fault
- * @n Input Data:
- * @li the Elementary object to operate on
- * @li EINA_TRUE, EINA_FALSE as the flag's value to set/unset focus to a given Elementary object
- *
- * @procedure
- * @step 1 Run the application main loop
- * @step 2 Get the list of widgets
- * @step 3 Allow focusable for every widget in list
- * @step 4 Show every widget in list
- * @step 5 Traverse the list of widgets
- * @step 6 Get whether the Elementary object is focusable or not. If the object is unfocusable then ignore it and go to the next object
- * @step 7 Call elm_object_focus_set with EINA_TRUE as the flag's value to set/unset focus to a given focusable Elementary object
- * @step 8 Get the whether the Elementary object has the focus or not
- * @step 9 Call elm_object_focus_set with EINA_FALSE as the flag's value to set/unset focus to a given focusable Elementary object
- * @step 10 Get the whether the Elementary object has the focus or not
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_object_focus_set_p)
-{
-   Eina_List *widgets = NULL, *l = NULL;
-   Evas_Object *obj = NULL;
-   Eina_Bool ret_focus = EINA_FALSE, is_object_focusable = EINA_TRUE, pass = EINA_FALSE;
-   char *widget_type = NULL;
-
-   if (main_win == NULL)
-     {
-        return;
-     }
-
-   widgets = utc_util_elm_not_container_widget_list_get(main_win);
-   if (widgets == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to get a list of widgets..", __FILE__, __LINE__);
-        return;
-     }
-
-   for (l = widgets; l; l = eina_list_next(l))
-     {
-        obj = (Evas_Object *) eina_list_data_get(l);
-        if (obj)
-          {
-             elm_object_focus_allow_set(obj, EINA_TRUE);
-             evas_object_show(obj);
-             widget_type = elm_object_widget_type_get(obj);
-             printf("[TEST_MSG]:: %s[%d] : Widget %s is testing...", __FILE__, __LINE__, widget_type);
-             is_object_focusable = elm_object_focus_allow_get(obj);
-             if (is_object_focusable == EINA_FALSE)
-               {
-                  printf("[TEST_MSG]:: %s[%d] : Widget %s can't be focused", __FILE__, __LINE__, widget_type);
-                  continue;
-               }
-             elm_object_focus_set(obj, EINA_TRUE);
-             WAIT_FOR(0.2)
-             ret_focus = elm_object_focus_get(obj);
-             if (ret_focus == EINA_FALSE)
-               {
-                  printf("[TEST_MSG]:: %s[%d] : Widget %s can't focus set", __FILE__, __LINE__, widget_type);
-                  continue;
-               }
-             elm_object_focus_set(obj, EINA_FALSE);
-             WAIT_FOR(0.2)
-             ret_focus = elm_object_focus_get(obj);
-             if (ret_focus == EINA_TRUE)
-               {
-                  printf("[TEST_MSG]:: %s[%d] : Widget %s can't focus unset", __FILE__, __LINE__, widget_type);
-                  continue;
-               }
-             pass = EINA_TRUE;
-             printf("[TEST_MSG]:: %s[%d] : Widget %s focused and unfocused. Test is ok", __FILE__, __LINE__, widget_type);
-          }
-     }
-   if (pass)
-     {
-        printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-     }
-   else
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to get any appropriate widget object..", __FILE__, __LINE__);
-     }
-}
-END_TEST
-
-/**
- * @addtogroup elm_object_focus_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set/unset focus to a given Elementary object
- * works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the Elementary object to operate on
- * @li EINA_TRUE as the flag's value to set/unset focus to a given Elementary object
- *
- * @procedure
- * @step 1 Call elm_object_focus_set with invalid value instead of the Elementary object to operate on
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_object_focus_set_n)
-{
-   Evas_Object *obj = NULL;
-
-   CREATE_CHECKED_ARGS_ARRAY(1, 0)
-   UNITEST_FUNC_NEG_CA(elm_object_focus_set, obj, EINA_TRUE)
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_object_focus_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_object_focus_set_p);
-   tcase_add_test(tcase, utc_elm_object_focus_set_n);
-   suite_add_tcase(suite, tcase);
-
-   return suite;
-}
-
-int
-main()
-{
-   int number_failed;
-
-   Suite *suite = test_suite();
-   SRunner *srunner = srunner_create(suite);
-   srunner_set_log(srunner, "utc_elm_object_focus_set.log");
-   srunner_set_xml(srunner, "utc_elm_object_focus_set.xml");
-   srunner_run_all(srunner, CK_NORMAL);
-   number_failed = srunner_ntests_failed(srunner);
-   srunner_free(srunner);
-
-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
index d1ec952c066d163ad6708ecd52b224e2a72c2d72..52e746b896adc47571536d8d1e3dbad94fdd5e7d 100644 (file)
@@ -92,11 +92,9 @@ utc_elm_entry_scrollable_set.c
 utc_elm_entry_select_all.c
 utc_elm_entry_select_none.c
 utc_elm_entry_select_region_set.c
-utc_elm_entry_selection_copy.c
-utc_elm_entry_selection_cut.c
 utc_elm_entry_selection_get.c
 utc_elm_entry_selection_handler_disabled_set.c
-utc_elm_entry_selection_paste.c
+utc_elm_entry_selection_cut_copy_paste.c
 utc_elm_entry_single_line_get.c
 utc_elm_entry_single_line_set.c
 utc_elm_entry_text_style_user_peek.c
index 724060384964a9e34360a23638f7498cf0924e77..1817171fecff3b6ef8b8428686ec9e966a7c24c2 100644 (file)
@@ -92,11 +92,9 @@ utc_elm_entry_scrollable_set.c
 utc_elm_entry_select_all.c
 utc_elm_entry_select_none.c
 utc_elm_entry_select_region_set.c
-#utc_elm_entry_selection_copy.c
-#utc_elm_entry_selection_cut.c
 utc_elm_entry_selection_get.c
 utc_elm_entry_selection_handler_disabled_set.c
-#utc_elm_entry_selection_paste.c
+#utc_elm_entry_selection_cut_copy_paste.c
 utc_elm_entry_single_line_get.c
 utc_elm_entry_single_line_set.c
 utc_elm_entry_text_style_user_peek.c
index d1ec952c066d163ad6708ecd52b224e2a72c2d72..52e746b896adc47571536d8d1e3dbad94fdd5e7d 100644 (file)
@@ -92,11 +92,9 @@ utc_elm_entry_scrollable_set.c
 utc_elm_entry_select_all.c
 utc_elm_entry_select_none.c
 utc_elm_entry_select_region_set.c
-utc_elm_entry_selection_copy.c
-utc_elm_entry_selection_cut.c
 utc_elm_entry_selection_get.c
 utc_elm_entry_selection_handler_disabled_set.c
-utc_elm_entry_selection_paste.c
+utc_elm_entry_selection_cut_copy_paste.c
 utc_elm_entry_single_line_get.c
 utc_elm_entry_single_line_set.c
 utc_elm_entry_text_style_user_peek.c
index 2f91a49e210a48051809582f711d3b3bb88d06c6..ffd675ca5706f7f6a0c2300ed9c338479e140779 100644 (file)
@@ -92,11 +92,9 @@ utc_elm_entry_scrollable_set.c
 utc_elm_entry_select_all.c
 utc_elm_entry_select_none.c
 utc_elm_entry_select_region_set.c
-utc_elm_entry_selection_copy.c
-utc_elm_entry_selection_cut.c
 utc_elm_entry_selection_get.c
 #utc_elm_entry_selection_handler_disabled_set.c
-utc_elm_entry_selection_paste.c
+utc_elm_entry_selection_cut_copy_paste.c
 utc_elm_entry_single_line_get.c
 utc_elm_entry_single_line_set.c
 utc_elm_entry_text_style_user_peek.c
index 2f91a49e210a48051809582f711d3b3bb88d06c6..ffd675ca5706f7f6a0c2300ed9c338479e140779 100644 (file)
@@ -92,11 +92,9 @@ utc_elm_entry_scrollable_set.c
 utc_elm_entry_select_all.c
 utc_elm_entry_select_none.c
 utc_elm_entry_select_region_set.c
-utc_elm_entry_selection_copy.c
-utc_elm_entry_selection_cut.c
 utc_elm_entry_selection_get.c
 #utc_elm_entry_selection_handler_disabled_set.c
-utc_elm_entry_selection_paste.c
+utc_elm_entry_selection_cut_copy_paste.c
 utc_elm_entry_single_line_get.c
 utc_elm_entry_single_line_set.c
 utc_elm_entry_text_style_user_peek.c
diff --git a/TC/elementary/entry/utc_elm_entry_selection_copy.c b/TC/elementary/entry/utc_elm_entry_selection_copy.c
deleted file mode 100644 (file)
index bfc8b37..0000000
+++ /dev/null
@@ -1,210 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL;
-
-Eina_Bool _timer_cb_copy(void *data)
-{
-   Evas_Object *entry_p = (Evas_Object *)data;
-   elm_entry_selection_copy(entry_p);
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-Eina_Bool _timer_cb_paste(void *data)
-{
-   Evas_Object *entry_p = (Evas_Object *)data;
-   elm_entry_selection_paste(entry_p);
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-Eina_Bool _timer_cb(void *data)
-{
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-/**
- * @addtogroup elm_entry
- * @{
- * @defgroup elm_entry_selection_copy elm_entry_selection_copy()
- *
- * @precondition
- * @step 1 Initialize elementary
- * @step 2 Create a main window
- * @step 3 Set size and focus for the main window
- * @step 4 Show the main window
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   elm_init(0, NULL);
-   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-   if (main_win == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
-     }
-   evas_object_resize(main_win, 320, 480);
-   elm_object_focus_set(main_win, EINA_TRUE);
-   evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_entry_selection_copy
- * @{
- * @objective Positive test case checks whether function call to copy text selected in created entry object
- * works properly
- * @n Input Data: the entry object
- *
- * @procedure
- * @step 1 Add an box object to the main window
- * @step 2 Show the box object
- * @step 3 Add an entry object to the main window
- * @step 4 Add an entry object to the box object
- * @step 5 Show the entry object
- * @step 6 Set the "test text" for the entry object
- * @step 7 Select the first 6 chars ("test t") from the entry text using cursor selection functions
- * @step 8 Copy the selected text from the entry object
- * @step 9 Set cursor position to the end of the entry text
- * @step 10 Paste the selected text to the entry object
- * @step 11 Get the entry text
- *
- * @passcondition Test passes if returned char array after function call is the "test texttest t" char array
- * @}
- */
-START_TEST(utc_elm_entry_selection_copy_p)
-{
-   Evas_Object *entry = NULL;
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   Evas_Object *box = NULL;
-#endif
-   const char *text = NULL;
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   box = elm_box_add(main_win);
-   if (box == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Unable to create an box object..", __FILE__, __LINE__);
-     }
-   evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   elm_win_resize_object_add(main_win, box);
-   evas_object_show(box);
-#endif
-
-   entry = elm_entry_add(main_win);
-   if (entry == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Unable to create an entry object..", __FILE__, __LINE__);
-     }
-   elm_entry_scrollable_set(entry, EINA_TRUE);
-   evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0.5);
-   elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
-   elm_object_text_set(entry, "test text");
-   elm_entry_single_line_set(entry, EINA_TRUE);
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   elm_box_pack_end(box, entry);
-#endif
-   evas_object_show(entry);
-   elm_object_focus_set(entry, EINA_TRUE);
-
-   text = elm_entry_entry_get(entry);
-   if (text == NULL || strcmp(text, "test text"))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Entry text: %s", __FILE__, __LINE__, text);
-     }
-   elm_entry_cursor_begin_set(entry);
-   elm_entry_cursor_selection_begin(entry);
-   elm_entry_cursor_pos_set(entry, 6);
-   elm_entry_cursor_selection_end(entry);
-   text = elm_entry_selection_get(entry);
-   if (text == NULL || strcmp(text, "test t"))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-     }
-   ecore_timer_add(3.0, _timer_cb_copy, entry);
-   ecore_main_loop_begin();
-   elm_entry_select_none(entry);
-   elm_entry_cursor_end_set(entry);
-   ecore_timer_add(5.0, _timer_cb_paste, entry);
-   ecore_main_loop_begin();
-   ecore_timer_add(5.0, _timer_cb, entry);
-   ecore_main_loop_begin();
-   text = elm_entry_entry_get(entry);
-   if (text == NULL || strcmp(text, "test texttest t"))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-     }
-   evas_object_del(entry);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_entry_selection_copy
- * @{
- * @objective Negative test case checks whether function called with NULL as the entry object
- * works without segmentation fault
- * @n Input Data: NULL instead of the entry object
- *
- * @procedure
- * @step 1 Call function with NULL as the entry object
- *
- * @passcondition Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_entry_selection_copy_n)
-{
-   UNITEST_FUNC_NEG(elm_entry_selection_copy, NULL);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_entry_selection_copy");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_entry_selection_copy_p);
-   tcase_add_test(tcase, utc_elm_entry_selection_copy_n);
-   suite_add_tcase(suite, tcase);
-
-   return suite;
-}
-
-int
-main()
-{
-   int number_failed;
-
-   Suite *suite = test_suite();
-   SRunner *srunner = srunner_create(suite);
-   srunner_set_log(srunner, "utc_elm_entry_selection_copy.log");
-   srunner_set_xml(srunner, "utc_elm_entry_selection_copy.xml");
-   srunner_run_all(srunner, CK_NORMAL);
-   number_failed = srunner_ntests_failed(srunner);
-   srunner_free(srunner);
-
-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/TC/elementary/entry/utc_elm_entry_selection_cut.c b/TC/elementary/entry/utc_elm_entry_selection_cut.c
deleted file mode 100644 (file)
index 63e6555..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL;
-
-Eina_Bool _timer_cb_cut(void *data)
-{
-   Evas_Object *entry_p = (Evas_Object *)data;
-   elm_entry_selection_cut(entry_p);
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-Eina_Bool _timer_cb_paste(void *data)
-{
-   Evas_Object *entry_p = (Evas_Object *)data;
-   elm_entry_selection_paste(entry_p);
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-Eina_Bool _timer_cb(void *data)
-{
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-/**
- * @addtogroup elm_entry
- * @{
- * @defgroup elm_entry_selection_cut elm_entry_selection_cut()
- *
- * @precondition
- * @step 1 Initialize elementary
- * @step 2 Create a main window
- * @step 3 Set size and focus for the main window
- * @step 4 Show the main window
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   elm_init(0, NULL);
-   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-   if (main_win == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
-     }
-   evas_object_resize(main_win, 320, 480);
-   elm_object_focus_set(main_win, EINA_TRUE);
-   evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_entry_selection_cut
- * @{
- * @objective Positive test case checks whether function call
- * to cut the selected text from the entry object works properly
- * @n Input Data: the entry object
- *
- * @procedure
- * @step 1 Add an box object to the main window
- * @step 2 Show the box object
- * @step 3 Add an entry object to the main window
- * @step 4 Add an entry object to the box object
- * @step 5 Show the entry object
- * @step 6 Set the "test text" for the entry object
- * @step 7 Select the first 5 chars("test ") from the entry text using cursor selection functions
- * @step 8 Cut the selected text with ecore timer
- * @step 9 Get the entry text
- * @step 10 Set the cursor position at the beginning of the entry text
- * @step 11 Paste the cut text at the beginning of the entry text with ecore timer
- *
- * @passcondition Test passes if returned char array after function call is the "test" char array
- * and the "test text" after pasting function call
- * @}
- */
-START_TEST(utc_elm_entry_selection_cut_p)
-{
-   Evas_Object *entry = NULL;
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   Evas_Object *box = NULL;
-#endif
-   const char *text = NULL;
-
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   box = elm_box_add(main_win);
-   if (box == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Unable to create an box object..", __FILE__, __LINE__);
-     }
-   evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   elm_win_resize_object_add(main_win, box);
-   evas_object_show(box);
-#endif
-
-   entry = elm_entry_add(main_win);
-   if (entry == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Unable to create an entry object..", __FILE__, __LINE__);
-     }
-   elm_entry_scrollable_set(entry, EINA_TRUE);
-   evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0.5);
-   elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
-   elm_object_text_set(entry, "test text");
-   elm_entry_single_line_set(entry, EINA_TRUE);
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   elm_box_pack_end(box, entry);
-#endif
-   evas_object_show(entry);
-   elm_object_focus_set(entry, EINA_TRUE);
-
-   elm_entry_cursor_begin_set(entry);
-   elm_entry_cursor_selection_begin(entry);
-   elm_entry_cursor_pos_set(entry, 5);
-   elm_entry_cursor_selection_end(entry);
-   text = elm_entry_selection_get(entry);
-   if (text == NULL || strcmp(text, "test "))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..1", __FILE__, __LINE__);
-     }
-   ecore_timer_add(5.0, _timer_cb_cut, entry);
-   ecore_main_loop_begin();
-   text = elm_entry_entry_get(entry);
-   if (text == NULL || strcmp(text, "text"))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..2", __FILE__, __LINE__);
-     }
-   elm_entry_cursor_begin_set(entry);
-   ecore_timer_add(5.0, _timer_cb_paste, entry);
-   ecore_main_loop_begin();
-   ecore_timer_add(5.0, _timer_cb, entry);
-   ecore_main_loop_begin();
-   text = elm_entry_entry_get(entry);
-   if (text == NULL || strcmp(text, "test text"))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Text pasting is failed..", text, __LINE__);
-     }
-   evas_object_del(entry);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_entry_selection_cut
- * @{
- * @objective Negative test case checks whether function called with NULL as the entry object
- * works without segmentation fault
- * @n Input Data: NULL instead of the entry object
- *
- * @procedure
- * @step 1 Call function with NULL as the entry object
- *
- * @passcondition Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_entry_selection_cut_n)
-{
-   UNITEST_FUNC_NEG(elm_entry_selection_cut, NULL);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_entry_selection_cut");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_entry_selection_cut_p);
-   tcase_add_test(tcase, utc_elm_entry_selection_cut_n);
-   suite_add_tcase(suite, tcase);
-
-   return suite;
-}
-
-int
-main()
-{
-   int number_failed;
-
-   Suite *suite = test_suite();
-   SRunner *srunner = srunner_create(suite);
-   srunner_set_log(srunner, "utc_elm_entry_selection_cut.log");
-   srunner_set_xml(srunner, "utc_elm_entry_selection_cut.xml");
-   srunner_run_all(srunner, CK_NORMAL);
-   number_failed = srunner_ntests_failed(srunner);
-   srunner_free(srunner);
-
-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
diff --git a/TC/elementary/entry/utc_elm_entry_selection_cut_copy_paste.c b/TC/elementary/entry/utc_elm_entry_selection_cut_copy_paste.c
new file mode 100644 (file)
index 0000000..81e0707
--- /dev/null
@@ -0,0 +1,265 @@
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+static Evas_Object *main_win = NULL;
+
+static Eina_Bool _timer_cb_cut(void *data)
+{
+   Evas_Object *entry_p = (Evas_Object *)data;
+   elm_entry_selection_cut(entry_p);
+   ecore_main_loop_quit();
+   return EINA_FALSE;
+}
+
+static Eina_Bool _timer_cb_copy(void *data)
+{
+   Evas_Object *entry_p = (Evas_Object *)data;
+   elm_entry_selection_copy(entry_p);
+   ecore_main_loop_quit();
+   return EINA_FALSE;
+}
+
+static Eina_Bool _timer_cb_paste(void *data)
+{
+   Evas_Object *entry_p = (Evas_Object *)data;
+   elm_entry_selection_paste(entry_p);
+   ecore_main_loop_quit();
+   return EINA_FALSE;
+}
+
+static Eina_Bool _timer_cb(void *data)
+{
+   ecore_main_loop_quit();
+   return EINA_FALSE;
+}
+
+/**
+ * @addtogroup elm_entry
+ * @{
+ * @defgroup elm_entry_selection_paste elm_entry_selection_paste()
+ *
+ * @precondition
+ * @step 1 Initialize elementary
+ * @step 2 Create and show a main window
+ * @step 3 Set size and focus for the main window
+ * @step 4 Show the main window
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   elm_init(0, NULL);
+   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+   if (main_win == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+     }
+   evas_object_resize(main_win, 320, 480);
+   elm_object_focus_set(main_win, EINA_TRUE);
+   evas_object_show(main_win);
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_entry_selection_cut, elm_entry_selection_copy, elm_entry_selection_paste
+ * @{
+ * @objective Positive test case checks whether function call
+ * to cut, copy and paste the selection to the entry object works properly
+ * @n Input Data: the entry object
+ *
+ * @procedure
+ * @step 1 Add an entry object to the main window
+ * @step 2 Show the entry object
+ * @step 3 Set the "Hello World" text for the entry object
+ * @step 4 Select all text in the entry
+ * @step 5 Cut the selected text and check if entry is empty with ecore timer
+ * @step 6 Paste the selected text with ecore timer
+ * @step 7 Get the entry text and check if pasted text is OK.
+ * @step 8 Select first 6 characters of the entry
+ * @step 9 copy the selected text and set the cursor at the end of the entry.
+ * @step 10 Paste the selected text with ecore timer
+ * @step 11 Get the entry text and check if pasted text is OK.
+ *
+ * @passcondition Test passes if returned value is the same as set value
+ * @}
+ */
+START_TEST(utc_elm_entry_selection_cut_copy_paste_p)
+{
+   Evas_Object *entry = NULL;
+   const char *entry_text = NULL;
+   entry = elm_entry_add(main_win);
+   if (entry == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Unable to create an entry object..", __FILE__, __LINE__);
+     }
+   elm_entry_scrollable_set(entry, EINA_TRUE);
+   evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, 0.0);
+   evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0.5);
+   elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+   elm_object_text_set(entry, "Hello World");
+   elm_entry_single_line_set(entry, EINA_TRUE);
+   evas_object_show(entry);
+   elm_object_focus_set(entry, EINA_TRUE);
+
+   /* testing cut & paste operation */
+   elm_entry_select_all(entry);
+   entry_text = elm_entry_selection_get(entry);
+   if (entry_text == NULL || strcmp(entry_text, "Hello World"))
+     {
+        evas_object_del(entry);
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Entry text: %s", __FILE__, __LINE__, entry_text);
+     }
+   ecore_timer_add(5.0, _timer_cb_cut, entry);
+   ecore_main_loop_begin();
+   entry_text = elm_entry_entry_get(entry);
+   if (entry_text == NULL || strcmp(entry_text, ""))
+     {
+        evas_object_del(entry);
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+   ecore_timer_add(5.0, _timer_cb_paste, entry);
+   ecore_main_loop_begin();
+   ecore_timer_add(5.0, _timer_cb, entry);
+   ecore_main_loop_begin();
+   entry_text = elm_entry_entry_get(entry);
+   if (entry_text == NULL || strcmp(entry_text, "Hello World"))
+     {
+        evas_object_del(entry);
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+   /* testing copy & paste operation */
+   elm_entry_cursor_begin_set(entry);
+   elm_entry_cursor_selection_begin(entry);
+   elm_entry_cursor_pos_set(entry, 6);
+   elm_entry_cursor_selection_end(entry);
+   entry_text = elm_entry_selection_get(entry);
+   if (entry_text == NULL || strcmp(entry_text, "Hello "))
+     {
+        evas_object_del(entry);
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+   ecore_timer_add(5.0, _timer_cb_copy, entry);
+   ecore_main_loop_begin();
+   elm_entry_select_none(entry);
+   elm_entry_cursor_end_set(entry);
+   ecore_timer_add(5.0, _timer_cb_paste, entry);
+   ecore_main_loop_begin();
+   ecore_timer_add(5.0, _timer_cb, entry);
+   ecore_main_loop_begin();
+   entry_text = elm_entry_entry_get(entry);
+   if (entry_text == NULL || strcmp(entry_text, "Hello WorldHello "))
+     {
+        evas_object_del(entry);
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+   evas_object_del(entry);
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_entry_selection_cut
+ * @{
+ * @objective Negative test case checks whether function called with NULL as the entry object
+ * works without segmentation fault
+ * @n Input Data: NULL instead of the entry object
+ *
+ * @procedure
+ * @step 1 Call function with NULL as the entry object
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_entry_selection_cut_n)
+{
+   UNITEST_FUNC_NEG(elm_entry_selection_cut, NULL);
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_entry_selection_copy
+ * @{
+ * @objective Negative test case checks whether function called with NULL as the entry object
+ * works without segmentation fault
+ * @n Input Data: NULL instead of the entry object
+ *
+ * @procedure
+ * @step 1 Call function with NULL as the entry object
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_entry_selection_copy_n)
+{
+   UNITEST_FUNC_NEG(elm_entry_selection_copy, NULL);
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_entry_selection_paste
+ * @{
+ * @objective Negative test case checks whether function called with NULL as the entry object
+ * works without segmentation fault
+ * @n Input Data: NULL instead of the entry object
+ *
+ * @procedure
+ * @step 1 Call function with NULL as the entry object
+ *
+ * @passcondition Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_entry_selection_paste_n)
+{
+   UNITEST_FUNC_NEG(elm_entry_selection_paste, NULL);
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_entry_selection_cut_copy_paste");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_entry_selection_cut_copy_paste_p);
+   tcase_add_test(tcase, utc_elm_entry_selection_cut_n);
+   tcase_add_test(tcase, utc_elm_entry_selection_copy_n);
+   tcase_add_test(tcase, utc_elm_entry_selection_paste_n);
+   suite_add_tcase(suite, tcase);
+
+   return suite;
+}
+
+int
+main()
+{
+   int number_failed;
+
+   Suite *suite = test_suite();
+   SRunner *srunner = srunner_create(suite);
+   srunner_set_log(srunner, "utc_elm_entry_selection_cut_copy_paste.log");
+   srunner_set_xml(srunner, "utc_elm_entry_selection_cut_copy_paste.xml");
+   srunner_run_all(srunner, CK_NORMAL);
+   number_failed = srunner_ntests_failed(srunner);
+   srunner_free(srunner);
+
+   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/TC/elementary/entry/utc_elm_entry_selection_paste.c b/TC/elementary/entry/utc_elm_entry_selection_paste.c
deleted file mode 100644 (file)
index 7b50609..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL;
-
-Eina_Bool _timer_cb_cut(void *data)
-{
-   Evas_Object *entry_p = (Evas_Object *)data;
-   elm_entry_selection_cut(entry_p);
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-Eina_Bool _timer_cb_paste(void *data)
-{
-   Evas_Object *entry_p = (Evas_Object *)data;
-   elm_entry_selection_paste(entry_p);
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-Eina_Bool _timer_cb(void *data)
-{
-   ecore_main_loop_quit();
-   return EINA_FALSE;
-}
-
-/**
- * @addtogroup elm_entry
- * @{
- * @defgroup elm_entry_selection_paste elm_entry_selection_paste()
- *
- * @precondition
- * @step 1 Initialize elementary
- * @step 2 Create and show a main window
- * @step 3 Set size and focus for the main window
- * @step 4 Show the main window
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   elm_init(0, NULL);
-   main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
-   if (main_win == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
-     }
-   evas_object_resize(main_win, 320, 480);
-   elm_object_focus_set(main_win, EINA_TRUE);
-   evas_object_show(main_win);
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_entry_selection_paste
- * @{
- * @objective Positive test case checks whether function call
- * to paste the selection to the entry object works properly
- * @n Input Data: the entry object
- *
- * @procedure
- * @step 1 Add an box object to the main window
- * @step 2 Show the box object
- * @step 3 Add an entry object to the main window
- * @step 4 Add an entry object to the box object
- * @step 5 Show the entry object
- * @step 6 Set the "Hello World" text for the entry object
- * @step 7 Select all text in the entry
- * @step 8 Cut the selected text and check if entry is empty with ecore timer
- * @step 9 Get the entry text
- * @step 10 Paste the selected text with ecore timer
- * @step 11 Get the entry text
- *
- * @passcondition Test passes if returned value is the same as set value
- * @}
- */
-START_TEST(utc_elm_entry_selection_paste_p)
-{
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   Evas_Object *box = NULL;
-#endif
-   Evas_Object *entry = NULL;
-   const char *entry_text = NULL;
-
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   box = elm_box_add(main_win);
-   if (box == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Unable to create an box object..", __FILE__, __LINE__);
-     }
-   evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   elm_win_resize_object_add(main_win, box);
-   evas_object_show(box);
-#endif
-
-   entry = elm_entry_add(main_win);
-   if (entry == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Unable to create an entry object..", __FILE__, __LINE__);
-     }
-   elm_entry_scrollable_set(entry, EINA_TRUE);
-   evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0.5);
-   elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
-   elm_object_text_set(entry, "Hello World");
-   elm_entry_single_line_set(entry, EINA_TRUE);
-#if 0 /* remove due to timer expiration issue when set entry to box */
-   elm_box_pack_end(box, entry);
-#endif
-   evas_object_show(entry);
-   elm_object_focus_set(entry, EINA_TRUE);
-
-   elm_entry_select_all(entry);
-   entry_text = elm_entry_selection_get(entry);
-   if (entry_text == NULL || strcmp(entry_text, "Hello World"))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Entry text: %s", __FILE__, __LINE__, entry_text);
-     }
-   ecore_timer_add(5.0, _timer_cb_cut, entry);
-   ecore_main_loop_begin();
-   entry_text = elm_entry_entry_get(entry);
-   if (entry_text == NULL || strcmp(entry_text, ""))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-     }
-   ecore_timer_add(5.0, _timer_cb_paste, entry);
-   ecore_main_loop_begin();
-   ecore_timer_add(5.0, _timer_cb, entry);
-   ecore_main_loop_begin();
-   entry_text = elm_entry_entry_get(entry);
-   if (entry_text == NULL || strcmp(entry_text, "Hello World"))
-     {
-        evas_object_del(entry);
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-     }
-   evas_object_del(entry);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @addtogroup elm_entry_selection_paste
- * @{
- * @objective Negative test case checks whether function called with NULL as the entry object
- * works without segmentation fault
- * @n Input Data: NULL instead of the entry object
- *
- * @procedure
- * @step 1 Call function with NULL as the entry object
- *
- * @passcondition Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_entry_selection_paste_n)
-{
-   UNITEST_FUNC_NEG(elm_entry_selection_paste, NULL);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_entry_selection_paste");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_entry_selection_paste_p);
-   tcase_add_test(tcase, utc_elm_entry_selection_paste_n);
-   suite_add_tcase(suite, tcase);
-
-   return suite;
-}
-
-int
-main()
-{
-   int number_failed;
-
-   Suite *suite = test_suite();
-   SRunner *srunner = srunner_create(suite);
-   srunner_set_log(srunner, "utc_elm_entry_selection_paste.log");
-   srunner_set_xml(srunner, "utc_elm_entry_selection_paste.xml");
-   srunner_run_all(srunner, CK_NORMAL);
-   number_failed = srunner_ntests_failed(srunner);
-   srunner_free(srunner);
-
-   return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
-}
index 1ef1d5e8c987244bc713eb7486781b1b2eaac356..28754ce60178cde76db8daf0734b85e696e2340e 100755 (executable)
@@ -116,6 +116,9 @@ fi
 
 print_checklist_pre
 
+## Disable crash popup
+pkgcmd -D -t tpk -n org.tizen.crash-syspopup --global
+
 ## Smack rules
 chsmack -e 'System' /opt/usr/efl-test-suite/TC/ecore/ecore_con/utc_ecore_con_server_add
 chsmack -e 'System' /opt/usr/efl-test-suite/TC/ecore/ecore_con/utc_ecore_con_server_flush
@@ -291,6 +294,9 @@ while read line_libs; do
        done < $filename
 done < $FileLibsScen
 
+## Enable crash popup
+pkgcmd -A -t tpk -n org.tizen.crash-syspopup --global
+
 ./target_generation_html_report.py $XML_RESULT
 
 #processing all passed, failed and errors TC