utc_evas_focus_xxxx: Merge TCs to reduce duplicate test operations 14/190514/2
authorApurv Khatri <apurv.khatri@samsung.com>
Wed, 3 Oct 2018 08:42:02 +0000 (14:12 +0530)
committerHermet Park <chuneon.park@samsung.com>
Fri, 12 Oct 2018 07:41:48 +0000 (07:41 +0000)
Change-Id: Idf5540b2cc223e837524532ae86048f59198e060

TC/evas/canvas/evas_focus/tslist
TC/evas/canvas/evas_focus/tslist_mobile
TC/evas/canvas/evas_focus/tslist_tv
TC/evas/canvas/evas_focus/tslist_wear
TC/evas/canvas/evas_focus/utc_evas_object_focus_get.c [deleted file]
TC/evas/canvas/evas_focus/utc_evas_object_focus_get_set.c [new file with mode: 0644]
TC/evas/canvas/evas_focus/utc_evas_object_focus_set.c [deleted file]

index e6e2216c0f68cab247dfc8946140c64a7224c170..bc2ee95f6277a9e299d77c5ee9e4dbcb8a299ccf 100644 (file)
@@ -1,6 +1,5 @@
 utc_evas_focus_get.c
-utc_evas_object_focus_get.c
-utc_evas_object_focus_set.c
+utc_evas_object_focus_get_set.c
 utc_evas_focus_in.c
 utc_evas_focus_out.c
 utc_evas_focus_state_get.c
index e6e2216c0f68cab247dfc8946140c64a7224c170..bc2ee95f6277a9e299d77c5ee9e4dbcb8a299ccf 100644 (file)
@@ -1,6 +1,5 @@
 utc_evas_focus_get.c
-utc_evas_object_focus_get.c
-utc_evas_object_focus_set.c
+utc_evas_object_focus_get_set.c
 utc_evas_focus_in.c
 utc_evas_focus_out.c
 utc_evas_focus_state_get.c
index 5a153c393145e3e0dbbafecfa3d92261182b1258..71d000fa383b29c374b317e402afc6531e27fd9e 100644 (file)
@@ -1,6 +1,5 @@
 #utc_evas_focus_get.c
-utc_evas_object_focus_get.c
-utc_evas_object_focus_set.c
+utc_evas_object_focus_get_set.c
 utc_evas_focus_in.c
 utc_evas_focus_out.c
 utc_evas_focus_state_get.c
index 5a153c393145e3e0dbbafecfa3d92261182b1258..71d000fa383b29c374b317e402afc6531e27fd9e 100644 (file)
@@ -1,6 +1,5 @@
 #utc_evas_focus_get.c
-utc_evas_object_focus_get.c
-utc_evas_object_focus_set.c
+utc_evas_object_focus_get_set.c
 utc_evas_focus_in.c
 utc_evas_focus_out.c
 utc_evas_focus_state_get.c
diff --git a/TC/evas/canvas/evas_focus/utc_evas_object_focus_get.c b/TC/evas/canvas/evas_focus/utc_evas_object_focus_get.c
deleted file mode 100644 (file)
index c58bcb6..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#include <check.h>
-#include <Evas.h>
-#include <Ecore_Evas.h>
-#include "../../../utc_negative_unitest.h"
-
-/**
- * @addtogroup evas_focus
- * @{
- * @defgroup evas_object_focus_get evas_object_focus_get()
- *
- *
- * @precondition
- * @step 1 Initialize with evas_init().
- */
-
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   evas_init();
-}
-
-static void
-teardown(void)
-{
-   printf(" ============ Cleanup ============ \n");
-   evas_shutdown();
-}
-
-/**
- * @addtogroup evas_object_focus_get
- * @{
- * @objective Positive test case checks if function gets focus of Evas_Object properly.
- * @n Input Data:
- * @li pointer to Evas_Object to get focus.
- *
- * @procedure
- * @step 1 Create evas
- * @step 2 Create box Evas_Object
- * @step 3 Check if focus is EINA_FALSE (default value)
- * @step 4 Set focus for object to EINA_TRUE
- * @step 5 Check if focus is set to EINA_TRUE
- *
- * @passcondition Function returns EINA_FALSE on step 3 and EINA_TRUE on step 5.
- * @}
- */
-START_TEST(utc_evas_object_focus_get_p)
-{
-   int result = TEST_FAIL;
-   Evas *evas = evas_new();
-   Evas_Object *obj;
-
-   evas_output_method_set(evas, evas_render_method_lookup("buffer"));
-   obj = evas_object_box_add(evas);
-
-   if (!obj)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
-     }
-   else if (evas_object_focus_get(obj) != EINA_FALSE)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Focus is EINA_TRUE..", __FILE__, __LINE__);
-     }
-   else
-     {
-        evas_object_focus_set(obj, EINA_TRUE);
-
-        if (evas_object_focus_get(obj) != EINA_TRUE)
-          {
-             ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Focus is not set to EINA_TRUE..", __FILE__, __LINE__);
-          }
-        else
-          {
-             printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-             result = TEST_PASS;
-          }
-     }
-   evas_free(evas);
-}
-END_TEST
-
-/**
- * @addtogroup evas_object_focus_get
- * @{
- * @objective Negative test case checks if function doesn't cause segmentation fault
- * and returns EINA_FALSE if it is called with NULL instead of pointer to Evas_Object.
- * @n Input Data: NULL as pointer to Evas_Object.
- *
- * @procedure
- * @step 1 Call function and pass NULL instead of it's argument.
- *
- * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
- * @}
- */
-START_TEST(utc_evas_object_focus_get_n)
-{
-
-   if (UNITEST_FUNC_NEG_RET(EINA_FALSE, evas_object_focus_get, NULL) == TEST_FAIL)
-     {
-        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
-/**
- *@}
- */
-
-TCase * _utc_evas_object_focus_get()
-{
-   TCase *tcase = tcase_create("utc_evas_object_focus_get");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_evas_object_focus_get_p);
-   tcase_add_test(tcase, utc_evas_object_focus_get_n);
-   return tcase;
-}
diff --git a/TC/evas/canvas/evas_focus/utc_evas_object_focus_get_set.c b/TC/evas/canvas/evas_focus/utc_evas_object_focus_get_set.c
new file mode 100644 (file)
index 0000000..5c7c43c
--- /dev/null
@@ -0,0 +1,142 @@
+#include <check.h>
+#include <Evas.h>
+#include <Ecore_Evas.h>
+#include "../../../utc_negative_unitest.h"
+
+/**
+ * @addtogroup evas_focus
+ * @{
+ * @defgroup evas_object_focus_get evas_object_focus_get()
+ *
+ *
+ * @precondition
+ * @step 1 Initialize with evas_init().
+ */
+
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   evas_init();
+}
+
+static void
+teardown(void)
+{
+   printf(" ============ Cleanup ============ \n");
+   evas_shutdown();
+}
+
+/**
+ * @addtogroup evas_object_focus_get
+ * @{
+ * @objective Positive test case checks if function gets focus of Evas_Object properly.
+ * @n Input Data:
+ * @li pointer to Evas_Object to get focus.
+ *
+ * @procedure
+ * @step 1 Create evas
+ * @step 2 Create box Evas_Object
+ * @step 3 Check if focus is EINA_FALSE (default value)
+ * @step 4 Set focus for object to EINA_TRUE
+ * @step 5 Check if focus is set to EINA_TRUE
+ *
+ * @passcondition Function returns EINA_FALSE on step 3 and EINA_TRUE on step 5.
+ * @}
+ */
+START_TEST(utc_evas_object_focus_get_p)
+{
+   int result = TEST_FAIL;
+   Evas *evas = evas_new();
+   Evas_Object *obj;
+
+   evas_output_method_set(evas, evas_render_method_lookup("buffer"));
+   obj = evas_object_box_add(evas);
+
+   if (!obj)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
+     }
+   else if (evas_object_focus_get(obj) != EINA_FALSE)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Focus is EINA_TRUE..", __FILE__, __LINE__);
+     }
+   else
+     {
+        evas_object_focus_set(obj, EINA_TRUE);
+
+        if (evas_object_focus_get(obj) != EINA_TRUE)
+          {
+             ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Focus is not set to EINA_TRUE..", __FILE__, __LINE__);
+          }
+        else
+          {
+             printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+             result = TEST_PASS;
+          }
+     }
+   evas_free(evas);
+}
+END_TEST
+
+/**
+ * @addtogroup evas_object_focus_get
+ * @{
+ * @objective Negative test case checks if function doesn't cause segmentation fault
+ * and returns EINA_FALSE if it is called with NULL instead of pointer to Evas_Object.
+ * @n Input Data: NULL as pointer to Evas_Object.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL instead of it's argument.
+ *
+ * @passcondition Function doesn't cause segmentation fault and returns EINA_FALSE.
+ * @}
+ */
+START_TEST(utc_evas_object_focus_get_n)
+{
+
+   if (UNITEST_FUNC_NEG_RET(EINA_FALSE, evas_object_focus_get, NULL) == TEST_FAIL)
+     {
+        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 evas_object_focus_set
+ * @{
+ * @objective Negative test case checks if function doesn't cause segmentation fault
+ * if it is called with NULL instead of Evas_Object pointer.
+ * @n Input Data: NULL instead of pointer to Evas_Object, EINA_TRUE as focus flag.
+ *
+ * @procedure
+ * @step 1 Call function and pass NULL as first argument.
+ *
+ * @passcondition Function doesn't cause segmentation fault.
+ * @}
+ */
+START_TEST(utc_evas_object_focus_set_n)
+{
+
+   CREATE_CHECKED_ARGS_ARRAY(1, 0);
+   UNITEST_FUNC_NEG_CA(evas_object_focus_set, NULL, EINA_TRUE);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_evas_object_focus_get_set()
+{
+   TCase *tcase = tcase_create("utc_evas_object_focus_get_set");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_evas_object_focus_get_p);
+   tcase_add_test(tcase, utc_evas_object_focus_get_n);
+   tcase_add_test(tcase, utc_evas_object_focus_set_n);
+   return tcase;
+}
diff --git a/TC/evas/canvas/evas_focus/utc_evas_object_focus_set.c b/TC/evas/canvas/evas_focus/utc_evas_object_focus_set.c
deleted file mode 100644 (file)
index 83a8d5a..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-#include <check.h>
-#include <Evas.h>
-#include <Ecore_Evas.h>
-#include "../../../utc_negative_unitest.h"
-
-/**
- * @addtogroup evas_focus
- * @{
- * @defgroup evas_object_focus_set evas_object_focus_set()
- *
- *
- * @precondition
- * @step 1 Initialize with evas_init().
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   evas_init();
-}
-
-static void
-teardown(void)
-{
-   printf(" ============ Cleanup ============ \n");
-   evas_shutdown();
-}
-
-/**
- * @addtogroup evas_object_focus_set
- * @{
- * @objective Positive test case checks if function sets focus of Evas_Object properly.
- * @n Input Data:
- * @li pointer to Evas_Object to set focus;
- * @li EINA_TRUE/EINA_FALSE - flag whether set focus or unset for first/second call.
- *
- * @procedure
- * @step 1 Create evas
- * @step 2 Create box Evas_Object
- * @step 3 Check if focus is EINA_FALSE (default value)
- * @step 4 Set focus for object to EINA_TRUE
- * @step 5 Check if focus is set to EINA_TRUE
- *
- * @passcondition Function returns EINA_FALSE on step 3 and EINA_TRUE on step 5.
- * @}
- */
-START_TEST(utc_evas_object_focus_set_p)
-{
-   int result = TEST_FAIL;
-   Evas *evas = evas_new();
-   Evas_Object *obj;
-
-   evas_output_method_set(evas, evas_render_method_lookup("buffer"));
-   obj = evas_object_box_add(evas);
-
-   if (!obj)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Evas_Object is not created..", __FILE__, __LINE__);
-     }
-   else if (evas_object_focus_get(obj) != EINA_FALSE)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Focus is EINA_TRUE..", __FILE__, __LINE__);
-     }
-   else
-     {
-        evas_object_focus_set(obj, EINA_TRUE);
-
-        if (evas_object_focus_get(obj) != EINA_TRUE)
-          {
-             ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed.. Focus is not set to EINA_TRUE..", __FILE__, __LINE__);
-          }
-        else
-          {
-             printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-             result = TEST_PASS;
-          }
-     }
-   evas_free(evas);
-}
-END_TEST
-
-/**
- * @addtogroup evas_object_focus_set
- * @{
- * @objective Negative test case checks if function doesn't cause segmentation fault
- * if it is called with NULL instead of Evas_Object pointer.
- * @n Input Data: NULL instead of pointer to Evas_Object, EINA_TRUE as focus flag.
- *
- * @procedure
- * @step 1 Call function and pass NULL as first argument.
- *
- * @passcondition Function doesn't cause segmentation fault.
- * @}
- */
-START_TEST(utc_evas_object_focus_set_n)
-{
-
-   CREATE_CHECKED_ARGS_ARRAY(1, 0);
-   UNITEST_FUNC_NEG_CA(evas_object_focus_set, NULL, EINA_TRUE);
-
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-/**
- *@}
- */
-
-TCase * _utc_evas_object_focus_set()
-{
-   TCase *tcase = tcase_create("utc_evas_object_focus_set");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_evas_object_focus_set_p);
-   tcase_add_test(tcase, utc_evas_object_focus_set_n);
-   return tcase;
-}