utc_elm_profile_xxxx: Merge TCs to reduce duplicate test operations 83/189183/2
authorApurv Khatri <apurv.khatri@samsung.com>
Fri, 14 Sep 2018 05:23:59 +0000 (10:53 +0530)
committerHermet Park <chuneon.park@samsung.com>
Fri, 21 Sep 2018 07:34:20 +0000 (07:34 +0000)
Change-Id: I5fc8999accd10299748ef738705aca1ecba8135a

TC/elementary/profile/tslist
TC/elementary/profile/tslist_mobile
TC/elementary/profile/tslist_tv
TC/elementary/profile/tslist_wear
TC/elementary/profile/utc_elm_config_profile_get.c [deleted file]
TC/elementary/profile/utc_elm_config_profile_get_set.c [new file with mode: 0644]
TC/elementary/profile/utc_elm_config_profile_set.c [deleted file]

index 0f6dcc8207facba1f0e26b2654afaf6d77c117fe..596c341ebe9da599b01926f225e9a675513d3493 100644 (file)
@@ -1,5 +1,4 @@
-utc_elm_config_profile_get.c
-utc_elm_config_profile_set.c
+utc_elm_config_profile_get_set.c
 utc_elm_config_profile_dir_get.c
 utc_elm_config_profile_dir_free.c
 utc_elm_config_profile_list_get.c
index 0f6dcc8207facba1f0e26b2654afaf6d77c117fe..596c341ebe9da599b01926f225e9a675513d3493 100644 (file)
@@ -1,5 +1,4 @@
-utc_elm_config_profile_get.c
-utc_elm_config_profile_set.c
+utc_elm_config_profile_get_set.c
 utc_elm_config_profile_dir_get.c
 utc_elm_config_profile_dir_free.c
 utc_elm_config_profile_list_get.c
index 0f6dcc8207facba1f0e26b2654afaf6d77c117fe..596c341ebe9da599b01926f225e9a675513d3493 100644 (file)
@@ -1,5 +1,4 @@
-utc_elm_config_profile_get.c
-utc_elm_config_profile_set.c
+utc_elm_config_profile_get_set.c
 utc_elm_config_profile_dir_get.c
 utc_elm_config_profile_dir_free.c
 utc_elm_config_profile_list_get.c
index 0f6dcc8207facba1f0e26b2654afaf6d77c117fe..596c341ebe9da599b01926f225e9a675513d3493 100644 (file)
@@ -1,5 +1,4 @@
-utc_elm_config_profile_get.c
-utc_elm_config_profile_set.c
+utc_elm_config_profile_get_set.c
 utc_elm_config_profile_dir_get.c
 utc_elm_config_profile_dir_free.c
 utc_elm_config_profile_list_get.c
diff --git a/TC/elementary/profile/utc_elm_config_profile_get.c b/TC/elementary/profile/utc_elm_config_profile_get.c
deleted file mode 100644 (file)
index cd0c259..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup elm_profile
- * @{
- * @defgroup elm_config_profile_get elm_config_profile_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   UTC_ELM_INIT();
-}
-
-static void
-teardown(void)
-{
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_config_profile_get
- * @{
- * @objective Positive Test case checks if get Elementary's profile works properly and doesn't cause segmentation fault
- * @n Input Data: no parameters passed to function
- *
- * @procedure
- * @step 1 Get the current profile
- *
- * @passcondition Returned value is not NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_config_profile_get_p)
-{
-   const char *profile = NULL;
-
-   profile = elm_config_profile_get();
-   if (profile == NULL)
-     {
-        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_elm_config_profile_get()
-{
-   TCase *tcase = tcase_create("utc_elm_config_profile_get");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_config_profile_get_p);
-   return tcase;
-}
diff --git a/TC/elementary/profile/utc_elm_config_profile_get_set.c b/TC/elementary/profile/utc_elm_config_profile_get_set.c
new file mode 100644 (file)
index 0000000..3d4fe27
--- /dev/null
@@ -0,0 +1,87 @@
+#include <check.h>
+#include <Elementary.h>
+#include "../utc_elm_common.h"
+#include "../../utc_negative_unitest.h"
+
+/**
+ * @addtogroup elm_profile
+ * @{
+ * @defgroup elm_config_profile_set elm_config_profile_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ */
+static void
+setup(void)
+{
+   printf(" ============ Startup ============ \n");
+   UTC_ELM_INIT();
+}
+
+static void
+teardown(void)
+{
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_config_profile_set
+ * @{
+ * @objective Positive Test case checks if set Elementary's profile works properly and doesn't cause segmentation fault
+ * @n Input Data: the "someProfile" string
+ *
+ * @procedure
+ * @step 1 Set config_profile to system
+ * @step 2 Get the config_profile as set
+ *
+ * @passcondition Returned value is equal to "someProfile" and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_config_profile_set_p)
+{
+   const char *config_profile = NULL;
+
+   elm_config_profile_set("someProfile");
+   config_profile = elm_config_profile_get();
+   if ((!config_profile) || (strcmp(config_profile, "someProfile") != 0))
+     {
+        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_config_profile_set
+ * @{
+ * @objective Negative Test case checks if test function call with NULL
+ * instead of the profile's name doesn't cause segmentation fault
+ * @n Input Data: NULL instead the profile's name
+ *
+ * @procedure
+ * @step 1 Call test function with NULL instead the profile's name
+ *
+ * @passcondition There is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_config_profile_set_n)
+{
+   UNITEST_FUNC_NEG(elm_config_profile_set, NULL);
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+
+TCase * _utc_elm_config_profile_get_set()
+{
+   TCase *tcase = tcase_create("utc_elm_config_profile_get_set");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_config_profile_set_p);
+   tcase_add_test(tcase, utc_elm_config_profile_set_n);
+   return tcase;
+}
diff --git a/TC/elementary/profile/utc_elm_config_profile_set.c b/TC/elementary/profile/utc_elm_config_profile_set.c
deleted file mode 100644 (file)
index cf3c11a..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../utc_elm_common.h"
-#include "../../utc_negative_unitest.h"
-
-/**
- * @addtogroup elm_profile
- * @{
- * @defgroup elm_config_profile_set elm_config_profile_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- */
-static void
-setup(void)
-{
-   printf(" ============ Startup ============ \n");
-   UTC_ELM_INIT();
-}
-
-static void
-teardown(void)
-{
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_config_profile_set
- * @{
- * @objective Positive Test case checks if set Elementary's profile works properly and doesn't cause segmentation fault
- * @n Input Data: the "someProfile" string
- *
- * @procedure
- * @step 1 Set config_profile to system
- * @step 2 Get the config_profile as set
- *
- * @passcondition Returned value is equal to "someProfile" and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_config_profile_set_p)
-{
-   const char *config_profile = NULL;
-
-   elm_config_profile_set("someProfile");
-   config_profile = elm_config_profile_get();
-   if ((!config_profile) || (strcmp(config_profile, "someProfile") != 0))
-     {
-        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
-
-/**
- * @addtogroup elm_config_profile_set
- * @{
- * @objective Negative Test case checks if test function call with NULL
- * instead of the profile's name doesn't cause segmentation fault
- * @n Input Data: NULL instead the profile's name
- *
- * @procedure
- * @step 1 Call test function with NULL instead the profile's name
- *
- * @passcondition There is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_config_profile_set_n)
-{
-   UNITEST_FUNC_NEG(elm_config_profile_set, NULL);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- *@}
- */
-
-TCase * _utc_elm_config_profile_set()
-{
-   TCase *tcase = tcase_create("utc_elm_config_profile_set");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_config_profile_set_p);
-   tcase_add_test(tcase, utc_elm_config_profile_set_n);
-   return tcase;
-}