utc_elm_calendar_xxxx: Reduce duplicate operations by merging TCs 39/187739/1
authorApurv Khatri <apurv.khatri@samsung.com>
Tue, 28 Aug 2018 06:20:46 +0000 (11:50 +0530)
committerApurv Khatri <apurv.khatri@samsung.com>
Tue, 28 Aug 2018 06:20:46 +0000 (11:50 +0530)
Change-Id: Id50ed84c63d2574c5d91b8b493175827b9f95add

33 files changed:
TC/elementary/calendar/tslist
TC/elementary/calendar/tslist_mobile
TC/elementary/calendar/tslist_tv
TC/elementary/calendar/tslist_wear
TC/elementary/calendar/utc_elm_calendar_add.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_displayed_time_get.c
TC/elementary/calendar/utc_elm_calendar_first_day_of_week_get.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_first_day_of_week_get_set.c [new file with mode: 0644]
TC/elementary/calendar/utc_elm_calendar_first_day_of_week_set.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_format_function_set.c
TC/elementary/calendar/utc_elm_calendar_interval_get.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_interval_get_set.c [new file with mode: 0644]
TC/elementary/calendar/utc_elm_calendar_interval_set.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_mark_add.c
TC/elementary/calendar/utc_elm_calendar_mark_del.c
TC/elementary/calendar/utc_elm_calendar_marks_clear.c
TC/elementary/calendar/utc_elm_calendar_marks_draw.c
TC/elementary/calendar/utc_elm_calendar_marks_get.c
TC/elementary/calendar/utc_elm_calendar_min_max_year_get.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_min_max_year_get_set.c [new file with mode: 0644]
TC/elementary/calendar/utc_elm_calendar_min_max_year_set.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_select_mode_get.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_select_mode_get_set.c [new file with mode: 0644]
TC/elementary/calendar/utc_elm_calendar_select_mode_set.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_selectable_get.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_selectable_get_set.c [new file with mode: 0644]
TC/elementary/calendar/utc_elm_calendar_selectable_set.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_selected_time_get.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_selected_time_get_set.c [new file with mode: 0644]
TC/elementary/calendar/utc_elm_calendar_selected_time_set.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_weekdays_names_get.c [deleted file]
TC/elementary/calendar/utc_elm_calendar_weekdays_names_get_set.c [new file with mode: 0644]
TC/elementary/calendar/utc_elm_calendar_weekdays_names_set.c [deleted file]

index 0669268539898ec117213e9890bccbd971b59c13..330c28a55ae02ec61390b85a661a9c713bf001ba 100644 (file)
@@ -1,23 +1,16 @@
-utc_elm_calendar_add.c
 utc_elm_calendar_day_selection_disabled.c
 utc_elm_calendar_displayed_time_get.c
-utc_elm_calendar_first_day_of_week_get.c
-utc_elm_calendar_first_day_of_week_set.c
+utc_elm_calendar_first_day_of_week_get_set.c
 utc_elm_calendar_format_function_set.c
-utc_elm_calendar_interval_get.c
-utc_elm_calendar_interval_set.c
+utc_elm_calendar_interval_get_set.c
 utc_elm_calendar_mark_add.c
 utc_elm_calendar_mark_del.c
 utc_elm_calendar_marks_clear.c
 utc_elm_calendar_marks_draw.c
 utc_elm_calendar_marks_get.c
-utc_elm_calendar_min_max_year_get.c
-utc_elm_calendar_min_max_year_set.c
-utc_elm_calendar_select_mode_get.c
-utc_elm_calendar_select_mode_set.c
-utc_elm_calendar_selectable_get.c
-utc_elm_calendar_selectable_set.c
-utc_elm_calendar_selected_time_get.c
-utc_elm_calendar_selected_time_set.c
-utc_elm_calendar_weekdays_names_get.c
-utc_elm_calendar_weekdays_names_set.c
+utc_elm_calendar_min_max_year_get_set.c
+utc_elm_calendar_select_mode_get_set.c
+utc_elm_calendar_selectable_get_set.c
+utc_elm_calendar_selected_time_get_set.c
+utc_elm_calendar_weekdays_names_get_set.c
+
index 0669268539898ec117213e9890bccbd971b59c13..330c28a55ae02ec61390b85a661a9c713bf001ba 100644 (file)
@@ -1,23 +1,16 @@
-utc_elm_calendar_add.c
 utc_elm_calendar_day_selection_disabled.c
 utc_elm_calendar_displayed_time_get.c
-utc_elm_calendar_first_day_of_week_get.c
-utc_elm_calendar_first_day_of_week_set.c
+utc_elm_calendar_first_day_of_week_get_set.c
 utc_elm_calendar_format_function_set.c
-utc_elm_calendar_interval_get.c
-utc_elm_calendar_interval_set.c
+utc_elm_calendar_interval_get_set.c
 utc_elm_calendar_mark_add.c
 utc_elm_calendar_mark_del.c
 utc_elm_calendar_marks_clear.c
 utc_elm_calendar_marks_draw.c
 utc_elm_calendar_marks_get.c
-utc_elm_calendar_min_max_year_get.c
-utc_elm_calendar_min_max_year_set.c
-utc_elm_calendar_select_mode_get.c
-utc_elm_calendar_select_mode_set.c
-utc_elm_calendar_selectable_get.c
-utc_elm_calendar_selectable_set.c
-utc_elm_calendar_selected_time_get.c
-utc_elm_calendar_selected_time_set.c
-utc_elm_calendar_weekdays_names_get.c
-utc_elm_calendar_weekdays_names_set.c
+utc_elm_calendar_min_max_year_get_set.c
+utc_elm_calendar_select_mode_get_set.c
+utc_elm_calendar_selectable_get_set.c
+utc_elm_calendar_selected_time_get_set.c
+utc_elm_calendar_weekdays_names_get_set.c
+
index 41befab4dff541dc3713aac0edf54edd686f98c2..48671d01183c4559b16eadf8addc7ce1f163fe4b 100644 (file)
@@ -1,23 +1,16 @@
-utc_elm_calendar_add.c
 #utc_elm_calendar_day_selection_disabled.c
 utc_elm_calendar_displayed_time_get.c
-utc_elm_calendar_first_day_of_week_get.c
-utc_elm_calendar_first_day_of_week_set.c
+utc_elm_calendar_first_day_of_week_get_set.c
 utc_elm_calendar_format_function_set.c
-utc_elm_calendar_interval_get.c
-utc_elm_calendar_interval_set.c
+utc_elm_calendar_interval_get_set.c
 utc_elm_calendar_mark_add.c
 utc_elm_calendar_mark_del.c
 utc_elm_calendar_marks_clear.c
 utc_elm_calendar_marks_draw.c
 utc_elm_calendar_marks_get.c
-utc_elm_calendar_min_max_year_get.c
-utc_elm_calendar_min_max_year_set.c
-utc_elm_calendar_select_mode_get.c
-utc_elm_calendar_select_mode_set.c
-utc_elm_calendar_selectable_get.c
-utc_elm_calendar_selectable_set.c
-utc_elm_calendar_selected_time_get.c
-utc_elm_calendar_selected_time_set.c
-utc_elm_calendar_weekdays_names_get.c
-utc_elm_calendar_weekdays_names_set.c
+utc_elm_calendar_min_max_year_get_set.c
+utc_elm_calendar_select_mode_get_set.c
+utc_elm_calendar_selectable_get_set.c
+utc_elm_calendar_selected_time_get_set.c
+utc_elm_calendar_weekdays_names_get_set.c
+
index 41befab4dff541dc3713aac0edf54edd686f98c2..48671d01183c4559b16eadf8addc7ce1f163fe4b 100644 (file)
@@ -1,23 +1,16 @@
-utc_elm_calendar_add.c
 #utc_elm_calendar_day_selection_disabled.c
 utc_elm_calendar_displayed_time_get.c
-utc_elm_calendar_first_day_of_week_get.c
-utc_elm_calendar_first_day_of_week_set.c
+utc_elm_calendar_first_day_of_week_get_set.c
 utc_elm_calendar_format_function_set.c
-utc_elm_calendar_interval_get.c
-utc_elm_calendar_interval_set.c
+utc_elm_calendar_interval_get_set.c
 utc_elm_calendar_mark_add.c
 utc_elm_calendar_mark_del.c
 utc_elm_calendar_marks_clear.c
 utc_elm_calendar_marks_draw.c
 utc_elm_calendar_marks_get.c
-utc_elm_calendar_min_max_year_get.c
-utc_elm_calendar_min_max_year_set.c
-utc_elm_calendar_select_mode_get.c
-utc_elm_calendar_select_mode_set.c
-utc_elm_calendar_selectable_get.c
-utc_elm_calendar_selectable_set.c
-utc_elm_calendar_selected_time_get.c
-utc_elm_calendar_selected_time_set.c
-utc_elm_calendar_weekdays_names_get.c
-utc_elm_calendar_weekdays_names_set.c
+utc_elm_calendar_min_max_year_get_set.c
+utc_elm_calendar_select_mode_get_set.c
+utc_elm_calendar_selectable_get_set.c
+utc_elm_calendar_selected_time_get_set.c
+utc_elm_calendar_weekdays_names_get_set.c
+
diff --git a/TC/elementary/calendar/utc_elm_calendar_add.c b/TC/elementary/calendar/utc_elm_calendar_add.c
deleted file mode 100644 (file)
index 2d46bc3..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_add elm_calendar_add()
- *
- * @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");
-}
-
-/**
- * @addtogroup elm_calendar_add
- * @{
- * @objective Positive Test case checks if function call with valid value to add a new calendar widget
- * to the given parent Elementary (container) object works properly and without segmentation fault
- * @n Input Data:
- * @li the window object
- *
- * @procedure
- * @step 1 Call elm_calendar_add with valid value
- *
- * @passcondition
- * @li Test passes if returned value is not NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_add_p)
-{
-   if (main_win == NULL)
-     {
-        return;
-     }
-
-   Evas_Object *calendar = NULL;
-
-   calendar = elm_calendar_add(main_win);
-   if (calendar == 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__);
-   evas_object_del(calendar);
-}
-END_TEST
-
-/**
- * @addtogroup elm_calendar_add
- * @{
- * @objective Negative Test case checks if function call with invalid value to add a new calendar widget
- * to the given parent Elementary (container) object works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the window object
- *
- * @procedure
- * @step 1 Call elm_calendar_add with invalid value instead of the window object
- *
- * @passcondition
- * @li Test passes if returned value is NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_add_n)
-{
-   if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_calendar_add, main_win))
-     {
-        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_calendar_add");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_add_p);
-   tcase_add_test(tcase, utc_elm_calendar_add_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_calendar_add.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_add.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 814515e84690dad7d4fbc6a8e2d6c7e4bba38147..468cd40564072265aa8d0b87b0100beab6f1987e 100644 (file)
@@ -23,14 +23,12 @@ setup(void)
    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);
    calendar = elm_calendar_add(main_win);
    if (calendar == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
      }
 }
 
@@ -64,11 +62,6 @@ teardown(void)
  */
 START_TEST(utc_elm_calendar_displayed_time_get_p)
 {
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
    struct tm local_time = {0}, ret_time = {5, 5, 5, 5, 5, 1995, 5, 5, 0};
    time_t current_time = 0;
    struct tm *tm_result = NULL;
@@ -79,14 +72,12 @@ START_TEST(utc_elm_calendar_displayed_time_get_p)
    if (tm_result == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
-        return;
      }
 
    ret = elm_calendar_displayed_time_get(calendar, &ret_time);
    if ((ret == EINA_FALSE) || (local_time.tm_mday != ret_time.tm_mday) || (local_time.tm_mon != ret_time.tm_mon) || (local_time.tm_year != ret_time.tm_year))
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
      }
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
@@ -110,11 +101,6 @@ END_TEST
  */
 START_TEST(utc_elm_calendar_displayed_time_get_n)
 {
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
    struct tm displayed_time = {0};
    time_t current_time = 0;
    struct tm *tm_result = NULL;
@@ -124,12 +110,10 @@ START_TEST(utc_elm_calendar_displayed_time_get_n)
    if (tm_result == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
-        return;
      }
    if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_calendar_displayed_time_get, calendar, &displayed_time))
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
      }
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
diff --git a/TC/elementary/calendar/utc_elm_calendar_first_day_of_week_get.c b/TC/elementary/calendar/utc_elm_calendar_first_day_of_week_get.c
deleted file mode 100644 (file)
index 1db8b85..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_first_day_of_week_get elm_calendar_first_day_of_week_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_first_day_of_week_get
- * @{
- * @objective Positive Test case checks if function call with valid values to get first day of week
- * on calendar works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- *
- * @procedure
- * @step 1 Call elm_calendar_first_day_of_week_set with valid values
- * @step 2 Get first day of week with elm_calendar_first_day_of_week_get() function
- *
- * @passcondition: Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_first_day_of_week_get_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   Elm_Calendar_Weekday first_day = ELM_DAY_MONDAY;
-
-
-   elm_calendar_first_day_of_week_set(calendar, ELM_DAY_FRIDAY);
-   first_day = elm_calendar_first_day_of_week_get(calendar);
-   if (first_day != ELM_DAY_FRIDAY)
-     {
-        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_calendar_first_day_of_week_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get first day of week
- * on calendar works without segmentation fault
- * @n Input Data:
- * @li NULL, the calendar object
- *
- * @procedure
- * @step 1 Call elm_calendar_first_day_of_week_get with invalid value instead of the calendar object
- *
- * @passcondition: Test passes if there is no segmentation fault and return value equals to ELM_DAY_SUNDAY
- * @}
- */
-START_TEST(utc_elm_calendar_first_day_of_week_get_n)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-
-   if (elm_calendar_first_day_of_week_get(NULL) != ELM_DAY_SUNDAY)
-     {
-        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_calendar_first_day_of_week_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_first_day_of_week_get_p);
-   tcase_add_test(tcase, utc_elm_calendar_first_day_of_week_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_calendar_first_day_of_week_get.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_first_day_of_week_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/calendar/utc_elm_calendar_first_day_of_week_get_set.c b/TC/elementary/calendar/utc_elm_calendar_first_day_of_week_get_set.c
new file mode 100644 (file)
index 0000000..01e494d
--- /dev/null
@@ -0,0 +1,184 @@
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+Evas_Object *main_win = NULL, *calendar = NULL;
+
+/**
+ * @addtogroup elm_calendar
+ * @{
+ * @defgroup elm_calendar_first_day_of_week_set elm_calendar_first_day_of_week_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a calendar to 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_show(main_win);
+   calendar = elm_calendar_add(main_win);
+   if (calendar == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
+     }
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_calendar_first_day_of_week_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set first day of week
+ * on calendar works properly and without segmentation fault
+ * @n Input Data:
+ * @li the calendar object
+ * @li the Elm_Calendar_Weekday value to be set as first day of week
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_first_day_of_week_set with valid values
+ * @step 2 Get first day of week with elm_calendar_first_day_of_week_get() function
+ *
+ * @passcondition: Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_first_day_of_week_set_p)
+{
+   Elm_Calendar_Weekday first_day = ELM_DAY_MONDAY;
+
+   elm_calendar_first_day_of_week_set(calendar, ELM_DAY_FRIDAY);
+   first_day = elm_calendar_first_day_of_week_get(calendar);
+   if (first_day != ELM_DAY_FRIDAY)
+     {
+        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_calendar_first_day_of_week_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set first day of week
+ * on calendar works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the calendar object
+ * @li ELM_DAY_MONDAY, the Elm_Calendar_Weekday value to be set as first day of week
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_first_day_of_week_set with invalid value instead of the calendar object
+ *
+ * @passcondition: Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_first_day_of_week_set_n)
+{
+   elm_calendar_first_day_of_week_set(NULL, ELM_DAY_MONDAY);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_calendar_first_day_of_week_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get first day of week
+ * on calendar works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the calendar object
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_first_day_of_week_get with invalid value instead of the calendar object
+ *
+ * @passcondition: Test passes if there is no segmentation fault and return value equals to ELM_DAY_SUNDAY
+ * @}
+ */
+START_TEST(utc_elm_calendar_first_day_of_week_get_n)
+{
+   if (elm_calendar_first_day_of_week_get(NULL) != ELM_DAY_SUNDAY)
+     {
+        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_calendar_add
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to add a new calendar widget
+ * to the given parent Elementary (container) object works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the window object
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_add with invalid value instead of the window object
+ *
+ * @passcondition
+ * @li Test passes if returned value is NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_add_n)
+{
+   if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_calendar_add, main_win))
+     {
+        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
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_calendar_first_day_of_week_get_set");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_calendar_first_day_of_week_set_p);
+   tcase_add_test(tcase, utc_elm_calendar_first_day_of_week_set_n);
+   tcase_add_test(tcase, utc_elm_calendar_first_day_of_week_get_n);
+   tcase_add_test(tcase, utc_elm_calendar_add_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_calendar_first_day_of_week_get_set.log");
+   srunner_set_xml(srunner, "utc_elm_calendar_first_day_of_week_get_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;
+}
diff --git a/TC/elementary/calendar/utc_elm_calendar_first_day_of_week_set.c b/TC/elementary/calendar/utc_elm_calendar_first_day_of_week_set.c
deleted file mode 100644 (file)
index b8fc426..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_first_day_of_week_set elm_calendar_first_day_of_week_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_first_day_of_week_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set first day of week
- * on calendar works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li the Elm_Calendar_Weekday value to be set as first day of week
- *
- * @procedure
- * @step 1 Call elm_calendar_first_day_of_week_set with valid values
- * @step 2 Get first day of week with elm_calendar_first_day_of_week_get() function
- *
- * @passcondition: Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_first_day_of_week_set_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   Elm_Calendar_Weekday first_day = ELM_DAY_MONDAY;
-
-
-   elm_calendar_first_day_of_week_set(calendar, ELM_DAY_FRIDAY);
-   first_day = elm_calendar_first_day_of_week_get(calendar);
-   if (first_day != ELM_DAY_FRIDAY)
-     {
-        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_calendar_first_day_of_week_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set first day of week
- * on calendar works without segmentation fault
- * @n Input Data:
- * @li NULL, the calendar object
- * @li ELM_DAY_MONDAY, the Elm_Calendar_Weekday value to be set as first day of week
- *
- * @procedure
- * @step 1 Call elm_calendar_first_day_of_week_set with invalid value instead of the calendar object
- *
- * @passcondition: Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_first_day_of_week_set_n)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-
-   elm_calendar_first_day_of_week_set(NULL, ELM_DAY_MONDAY);
-
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_calendar_first_day_of_week_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_first_day_of_week_set_p);
-   tcase_add_test(tcase, utc_elm_calendar_first_day_of_week_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_calendar_first_day_of_week_set.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_first_day_of_week_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 74264910326ea1e0acd1598ff812774e6f0a5156..8c46c4b15f8629baced19f082d415956cac353d4 100644 (file)
@@ -23,14 +23,12 @@ setup(void)
    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);
    calendar = elm_calendar_add(main_win);
    if (calendar == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
      }
 }
 
@@ -74,11 +72,6 @@ char* _format_month_year_cb(struct tm *stime)
  */
 START_TEST(utc_elm_calendar_format_function_set_p)
 {
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
    elm_calendar_format_function_set(calendar, _format_month_year_cb);
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
@@ -103,11 +96,6 @@ END_TEST
  */
 START_TEST(utc_elm_calendar_format_function_set_n)
 {
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
    UNITEST_FUNC_NEG(elm_calendar_format_function_set, calendar, _format_month_year_cb)
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
diff --git a/TC/elementary/calendar/utc_elm_calendar_interval_get.c b/TC/elementary/calendar/utc_elm_calendar_interval_get.c
deleted file mode 100644 (file)
index 611ef1f..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_interval_get elm_calendar_interval_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_interval_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get the interval on time updates
- * for an user mouse button hold on calendar widgets' month selection works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- *
- * @procedure
- * @step 1 Set the interval on time updates for an user mouse button hold on calendar widgets' month selection
- * @step 2 Call elm_calendar_interval_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_calendar_interval_get_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   double ret = 0.0;
-
-   elm_calendar_interval_set(calendar, 0.4);
-   ret = elm_calendar_interval_get(calendar);
-   if (fabs(ret - 0.4) >= DBL_EPSILON)
-     {
-        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_calendar_interval_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get the interval on time updates
- * for an user mouse button hold on calendar widgets' month selection works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the calendar object
- *
- * @procedure
- * @step 1 Call elm_calendar_interval_get with invalid value instead of the calendar object
- *
- * @passcondition
- * @li Test passes if returned value is 0.0 and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_interval_get_n)
-{
-   double ret = 0.0;
-
-   ret = elm_calendar_interval_get(NULL);
-   if (fabs(ret - 0.0) >= DBL_EPSILON)
-     {
-        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_calendar_interval_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_interval_get_p);
-   tcase_add_test(tcase, utc_elm_calendar_interval_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_calendar_interval_get.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_interval_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/calendar/utc_elm_calendar_interval_get_set.c b/TC/elementary/calendar/utc_elm_calendar_interval_get_set.c
new file mode 100644 (file)
index 0000000..4235dd2
--- /dev/null
@@ -0,0 +1,163 @@
+#include <check.h>
+#include <Elementary.h>
+Evas_Object *main_win = NULL, *calendar = NULL;
+
+/**
+ * @addtogroup elm_calendar
+ * @{
+ * @defgroup elm_calendar_interval_set elm_calendar_interval_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a calendar to 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_show(main_win);
+   calendar = elm_calendar_add(main_win);
+   if (calendar == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
+     }
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_calendar_interval_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set the interval on time updates
+ * for an user mouse button hold on calendar widgets' month selection works properly and without segmentation fault
+ * @n Input Data:
+ * @li the calendar object
+ * @li 0.4 as the the (first) interval value in seconds
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_interval_set with valid values
+ * @step 2 Get the interval on time updates for an user mouse button hold on calendar widgets' month selection
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_interval_set_p)
+{
+   double ret = 0.0;
+
+   elm_calendar_interval_set(calendar, 0.4);
+   ret = elm_calendar_interval_get(calendar);
+   if (fabs(ret - 0.4) >= DBL_EPSILON)
+     {
+        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_calendar_interval_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set the interval on time updates
+ * for an user mouse button hold on calendar widgets' month selection works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the calendar object
+ * @li 0.4, -0.4 as the (first) interval value in seconds
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_interval_set with invalid value instead of the calendar object
+ * @step 2 Call elm_calendar_interval_set with invalid value instead of the (first) interval value in seconds
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_interval_set_n)
+{
+   elm_calendar_interval_set(NULL, 0.4);
+   elm_calendar_interval_set(calendar, -0.4);
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_calendar_interval_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get the interval on time updates
+ * for an user mouse button hold on calendar widgets' month selection works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the calendar object
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_interval_get with invalid value instead of the calendar object
+ *
+ * @passcondition
+ * @li Test passes if returned value is 0.0 and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_interval_get_n)
+{
+   double ret = 0.0;
+
+   ret = elm_calendar_interval_get(NULL);
+   if (fabs(ret - 0.0) >= DBL_EPSILON)
+     {
+        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
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_calendar_interval_get_set");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_calendar_interval_set_p);
+   tcase_add_test(tcase, utc_elm_calendar_interval_set_n);
+   tcase_add_test(tcase, utc_elm_calendar_interval_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_calendar_interval_get_set.log");
+   srunner_set_xml(srunner, "utc_elm_calendar_interval_get_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;
+}
diff --git a/TC/elementary/calendar/utc_elm_calendar_interval_set.c b/TC/elementary/calendar/utc_elm_calendar_interval_set.c
deleted file mode 100644 (file)
index 5ad888a..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_interval_set elm_calendar_interval_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_interval_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the interval on time updates
- * for an user mouse button hold on calendar widgets' month selection works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li 0.4 as the the (first) interval value in seconds
- *
- * @procedure
- * @step 1 Call elm_calendar_interval_set with valid values
- * @step 2 Get the interval on time updates for an user mouse button hold on calendar widgets' month selection
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_interval_set_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   double ret = 0.0;
-
-   elm_calendar_interval_set(calendar, 0.4);
-   ret = elm_calendar_interval_get(calendar);
-   if (fabs(ret - 0.4) >= DBL_EPSILON)
-     {
-        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_calendar_interval_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set the interval on time updates
- * for an user mouse button hold on calendar widgets' month selection works without segmentation fault
- * @n Input Data:
- * @li NULL, the calendar object
- * @li 0.4, -0.4 as the (first) interval value in seconds
- *
- * @procedure
- * @step 1 Call elm_calendar_interval_set with invalid value instead of the calendar object
- * @step 2 Call elm_calendar_interval_set with invalid value instead of the (first) interval value in seconds
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_interval_set_n)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   elm_calendar_interval_set(NULL, 0.4);
-   elm_calendar_interval_set(calendar, -0.4);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_calendar_interval_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_interval_set_p);
-   tcase_add_test(tcase, utc_elm_calendar_interval_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_calendar_interval_set.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_interval_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 451256cdb29b0269cd33af6749595503d56e6c04..8918271d7575772df221ba4531a780f2dd6000c3 100644 (file)
@@ -22,14 +22,12 @@ setup(void)
    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);
    calendar = elm_calendar_add(main_win);
    if (calendar == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
      }
 }
 
@@ -69,11 +67,6 @@ teardown(void)
  */
 START_TEST(utc_elm_calendar_mark_add_p)
 {
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
    const Eina_List *e_list = NULL;
    Elm_Calendar_Mark *mark = NULL;
    struct tm selected_time = {0};
@@ -86,14 +79,12 @@ START_TEST(utc_elm_calendar_mark_add_p)
    if (tm_result == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
-        return;
      }
    e_list = elm_calendar_marks_get(calendar);
    count_before_add = eina_list_count(e_list);
    if(count_before_add != 0) {
       ck_abort_msg("[TEST_FAIL]:: %s[%d] : Empty list of the all calendar marks was expected before addition of the mark..", __FILE__, __LINE__);
       eina_list_free(e_list);
-      return;
    }
    mark = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
    if (mark == NULL)
@@ -107,7 +98,6 @@ START_TEST(utc_elm_calendar_mark_add_p)
    if(count_after_del != 0) {
       ck_abort_msg("[TEST_FAIL]:: %s[%d] : Empty list of the all calendar marks was expected after deletion of the mark..", __FILE__, __LINE__);
       eina_list_free(e_list);
-      return;
    }
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
@@ -140,11 +130,6 @@ END_TEST
  */
 START_TEST(utc_elm_calendar_mark_add_n)
 {
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
    Elm_Calendar_Mark *mark = NULL;
    struct tm selected_time = {0};
    time_t current_time = 0;
@@ -155,14 +140,12 @@ START_TEST(utc_elm_calendar_mark_add_n)
    if (tm_result == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
-        return;
      }
    mark = elm_calendar_mark_add(NULL, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
    if (mark != NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
         elm_calendar_mark_del(mark);
-        return;
      }
    // NOT_APPROVED_FOR_BUILD this parameter not checked by NULL
    /*mark = elm_calendar_mark_add(calendar, "checked", NULL, ELM_CALENDAR_UNIQUE);
@@ -176,14 +159,12 @@ START_TEST(utc_elm_calendar_mark_add_n)
    if (mark == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
      }
    elm_calendar_mark_del(mark);
    mark = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_UNIQUE - 1);
    if (mark == 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__);
    elm_calendar_mark_del(mark);
index 4a060b03647a293f01604b1110765c5339aa1a58..bd996642989fa9b044187d52333c53daf9c2722e 100644 (file)
@@ -32,14 +32,12 @@ setup(void)
    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);
    calendar = elm_calendar_add(main_win);
    if (calendar == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
      }
    current_time = time(NULL);
    tm_result = localtime_r(&current_time, &selected_time);
@@ -47,13 +45,11 @@ setup(void)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
         is_localtime_r = EINA_FALSE;
-        return;
      }
    mark = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
    if (mark == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a mark object to the calendar..", __FILE__, __LINE__);
-        return;
      }
 }
 
@@ -89,11 +85,6 @@ teardown(void)
  */
 START_TEST(utc_elm_calendar_mark_del_p)
 {
-   if (main_win == NULL || calendar == NULL || is_localtime_r == EINA_FALSE || mark == NULL)
-     {
-        return;
-     }
-
    const Eina_List *e_list = NULL;
    unsigned int count_before_del = 0, count_after_del = 0;
 
@@ -101,7 +92,6 @@ START_TEST(utc_elm_calendar_mark_del_p)
    count_before_del = eina_list_count(e_list);
    if(count_before_del != 1) {
       ck_abort_msg("[TEST_FAIL]:: %s[%d] : List of the all calendar marks does not contain a one element before deletion of the mark..", __FILE__, __LINE__);
-      return;
    }
    elm_calendar_mark_del(mark);
    e_list = elm_calendar_marks_get(calendar);
@@ -110,7 +100,6 @@ START_TEST(utc_elm_calendar_mark_del_p)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
         eina_list_free(e_list);
-        return;
      }
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
index 83c4a53314aaf23084edc5b279ad1de1234d88ff..7d51d6c63a89879908f1b5ea0751126cd370b13a 100644 (file)
@@ -33,14 +33,12 @@ setup(void)
    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);
    calendar = elm_calendar_add(main_win);
    if (calendar == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
      }
    current_time = time(NULL);
    tm_result = localtime_r(&current_time, &selected_time);
@@ -48,19 +46,16 @@ setup(void)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
         is_localtime_r = EINA_FALSE;
-        return;
      }
    mark1 = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
    if (mark1 == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a 1st mark object to the calendar..", __FILE__, __LINE__);
-        return;
      }
    mark2 = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_WEEKLY);
    if (mark2 == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a 2nd mark object to the calendar..", __FILE__, __LINE__);
-        return;
      }
 }
 
@@ -95,11 +90,6 @@ teardown(void)
  */
 START_TEST(utc_elm_calendar_marks_clear_p)
 {
-   if (main_win == NULL || calendar == NULL || is_localtime_r == EINA_FALSE || mark1 == NULL || mark2 == NULL)
-     {
-        return;
-     }
-
    const Eina_List *e_list = NULL;
    unsigned int count = 0;
 
@@ -110,7 +100,6 @@ START_TEST(utc_elm_calendar_marks_clear_p)
    if (count != 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__);
 }
index 57a28dbdde0787dfbb042bc84dae913b294de905..0b938ee54606ed978927a72fad816e2242c16127 100644 (file)
@@ -33,14 +33,12 @@ setup(void)
    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);
    calendar = elm_calendar_add(main_win);
    if (calendar == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
      }
    current_time = time(NULL);
    tm_result = localtime_r(&current_time, &selected_time);
@@ -48,19 +46,16 @@ setup(void)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
         is_localtime_r = EINA_FALSE;
-        return;
      }
    mark1 = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
    if (mark1 == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a 1st mark object to the calendar..", __FILE__, __LINE__);
-        return;
      }
    mark2 = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_WEEKLY);
    if (mark2 == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a 2nd mark object to the calendar..", __FILE__, __LINE__);
-        return;
      }
 }
 
@@ -93,11 +88,6 @@ teardown(void)
  */
 START_TEST(utc_elm_calendar_marks_draw_p)
 {
-   if (main_win == NULL || calendar == NULL || is_localtime_r == EINA_FALSE || mark1 == NULL || mark2 == NULL)
-     {
-        return;
-     }
-
    elm_calendar_marks_draw(calendar);
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
index 89c5ee7e633858150d2d57b0520b0e13de1ac760..881651690b3d21a9e11fb776b8739985c8c6d6a7 100644 (file)
@@ -33,14 +33,12 @@ setup(void)
    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);
    calendar = elm_calendar_add(main_win);
    if (calendar == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
      }
    current_time = time(NULL);
    tm_result = localtime_r(&current_time, &selected_time);
@@ -48,19 +46,16 @@ setup(void)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
         is_localtime_r = EINA_FALSE;
-        return;
      }
    mark1 = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_UNIQUE);
    if (mark1 == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a 1st mark object to the calendar..", __FILE__, __LINE__);
-        return;
      }
    mark2 = elm_calendar_mark_add(calendar, "checked", &selected_time, ELM_CALENDAR_WEEKLY);
    if (mark2 == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a 2nd mark object to the calendar..", __FILE__, __LINE__);
-        return;
      }
 }
 
@@ -93,11 +88,6 @@ teardown(void)
  */
 START_TEST(utc_elm_calendar_marks_get_p)
 {
-   if (main_win == NULL || calendar == NULL || is_localtime_r == EINA_FALSE || mark1 == NULL || mark2 == NULL)
-     {
-        return;
-     }
-
    const Eina_List *marks = NULL;
    unsigned int count_of_marks = 0;
 
@@ -106,7 +96,6 @@ START_TEST(utc_elm_calendar_marks_get_p)
    if (count_of_marks != 2)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
      }
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
@@ -132,7 +121,6 @@ START_TEST(utc_elm_calendar_marks_get_n)
    if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_calendar_marks_get, calendar))
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
      }
    printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
 }
diff --git a/TC/elementary/calendar/utc_elm_calendar_min_max_year_get.c b/TC/elementary/calendar/utc_elm_calendar_min_max_year_get.c
deleted file mode 100644 (file)
index fed806c..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_min_max_year_get elm_calendar_min_max_year_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_min_max_year_get
- * @{
- * @objective Positive Test case checks if function call with valid values to get the minimum and maximum
- * values for the year works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li the int to store the minimum year
- * @li the int to store the maximum year
- *
- * @procedure
- * @step 1 Set the minimum and maximum values for the year
- * @step 2 Call elm_calendar_min_max_year_get with valid values
- *
- * @passcondition
- * @li Test passes if returned values is same as specified values and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_min_max_year_get_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   int min_year = 0, max_year = 0;
-
-   elm_calendar_min_max_year_set(calendar, 2010, 2020);
-   elm_calendar_min_max_year_get(calendar, &min_year, &max_year);
-   if ((min_year != 2010) || (max_year != 2020))
-     {
-        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_calendar_min_max_year_get
- * @{
- * @objective Negative Test case 1 checks if function call with invalid value to get the minimum and maximum
- * values for the year works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the calendar object
- * @li the int to store the minimum year
- * @li the int to store the maximum year
- *
- * @procedure
- * @step 1 Call elm_calendar_min_max_year_get with invalid value instead of the calendar object
- *
- * @passcondition
- * @li Test passes if returned values are same as they were before function call and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_min_max_year_get_n)
-{
-   int min_year = 0, max_year = 0;
-
-   elm_calendar_min_max_year_get(NULL, &min_year, &max_year);
-   if ((min_year != 0) || (max_year != 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_calendar_min_max_year_get
- * @{
- * @objective Negative Test case 2 checks if function call with invalid value to get the minimum and maximum
- * values for the year works without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li NULL, the int to store the minimum year
- * @li NULL, the int to store the maximum year
- *
- * @procedure
- * @step 1 Call elm_calendar_min_max_year_get with invalid value instead of the int to store the minimum year
- * @step 2 Call elm_calendar_min_max_year_get with invalid value instead of the int to store the maximum year
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_min_max_year_get_n2)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   int min_year = 0, max_year = 0;
-
-   CREATE_CHECKED_ARGS_ARRAY(0, 1, 1)
-   UNITEST_FUNC_NEG_CA(elm_calendar_min_max_year_get, calendar, &min_year, &max_year)
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_calendar_min_max_year_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_min_max_year_get_p);
-   tcase_add_test(tcase, utc_elm_calendar_min_max_year_get_n);
-   tcase_add_test(tcase, utc_elm_calendar_min_max_year_get_n2);
-   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_calendar_min_max_year_get.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_min_max_year_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/calendar/utc_elm_calendar_min_max_year_get_set.c b/TC/elementary/calendar/utc_elm_calendar_min_max_year_get_set.c
new file mode 100644 (file)
index 0000000..f0081e1
--- /dev/null
@@ -0,0 +1,199 @@
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+Evas_Object *main_win = NULL, *calendar = NULL;
+
+/**
+ * @addtogroup elm_calendar
+ * @{
+ * @defgroup elm_calendar_min_max_year_get elm_calendar_min_max_year_get()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a calendar to 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_show(main_win);
+   calendar = elm_calendar_add(main_win);
+   if (calendar == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
+     }
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_calendar_min_max_year_get
+ * @{
+ * @objective Positive Test case checks if function call with valid values to get the minimum and maximum
+ * values for the year works properly and without segmentation fault
+ * @n Input Data:
+ * @li the calendar object
+ * @li the int to store the minimum year
+ * @li the int to store the maximum year
+ *
+ * @procedure
+ * @step 1 Set the minimum and maximum values for the year
+ * @step 2 Call elm_calendar_min_max_year_get with valid values
+ *
+ * @passcondition
+ * @li Test passes if returned values is same as specified values and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_min_max_year_get_p)
+{
+   int min_year = 0, max_year = 0;
+
+   elm_calendar_min_max_year_set(calendar, 2010, 2020);
+   elm_calendar_min_max_year_get(calendar, &min_year, &max_year);
+   if ((min_year != 2010) || (max_year != 2020))
+     {
+        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_calendar_min_max_year_get
+ * @{
+ * @objective Negative Test case 1 checks if function call with invalid value to get the minimum and maximum
+ * values for the year works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the calendar object
+ * @li the int to store the minimum year
+ * @li the int to store the maximum year
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_min_max_year_get with invalid value instead of the calendar object
+ *
+ * @passcondition
+ * @li Test passes if returned values are same as they were before function call and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_min_max_year_get_n)
+{
+   int min_year = 0, max_year = 0;
+
+   elm_calendar_min_max_year_get(NULL, &min_year, &max_year);
+   if ((min_year != 0) || (max_year != 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_calendar_min_max_year_get
+ * @{
+ * @objective Negative Test case 2 checks if function call with invalid value to get the minimum and maximum
+ * values for the year works without segmentation fault
+ * @n Input Data:
+ * @li the calendar object
+ * @li NULL, the int to store the minimum year
+ * @li NULL, the int to store the maximum year
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_min_max_year_get with invalid value instead of the int to store the minimum year
+ * @step 2 Call elm_calendar_min_max_year_get with invalid value instead of the int to store the maximum year
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_min_max_year_get_n2)
+{
+   int min_year = 0, max_year = 0;
+
+   CREATE_CHECKED_ARGS_ARRAY(0, 1, 1)
+   UNITEST_FUNC_NEG_CA(elm_calendar_min_max_year_get, calendar, &min_year, &max_year)
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_calendar_min_max_year_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set the minimum and maximum
+ * values for the year works without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the calendar object
+ * @li NULL, 2010, -1000000 as the minimum year, greater than 1901
+ * @li NULL, 2020, 250000 as the maximum year
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_min_max_year_set with invalid value instead of the calendar object
+ * @step 2 Call elm_calendar_min_max_year_set with invalid value instead of the minimum year
+ * @step 3 Call elm_calendar_min_max_year_set with invalid value instead of the maximum year
+ * @step 4 Call elm_calendar_min_max_year_set with overflowing value instead of the minimum year and the maximum year
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_min_max_year_set_n)
+{
+   UNITEST_FUNC_NEG(elm_calendar_min_max_year_set, calendar, 2010, 2020)
+   elm_calendar_min_max_year_set(calendar, -1000000 , 250000);
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_calendar_min_max_year_get_set");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_calendar_min_max_year_get_p);
+   tcase_add_test(tcase, utc_elm_calendar_min_max_year_get_n);
+   tcase_add_test(tcase, utc_elm_calendar_min_max_year_get_n2);
+   tcase_add_test(tcase, utc_elm_calendar_min_max_year_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_calendar_min_max_year_get_set.log");
+   srunner_set_xml(srunner, "utc_elm_calendar_min_max_year_get_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;
+}
diff --git a/TC/elementary/calendar/utc_elm_calendar_min_max_year_set.c b/TC/elementary/calendar/utc_elm_calendar_min_max_year_set.c
deleted file mode 100644 (file)
index f9b774b..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_min_max_year_set elm_calendar_min_max_year_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_min_max_year_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set the minimum and maximum
- * values for the year works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li 2010 as the minimum year, greater than 1901
- * @li 2020 as the maximum year
- *
- * @procedure
- * @step 1 Call elm_calendar_min_max_year_set with valid values
- * @step 2 Get the minimum and maximum values for the year
- *
- * @passcondition
- * @li Test passes if returned values is same as specified values and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_min_max_year_set_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   int min_year = 0, max_year = 0;
-
-   elm_calendar_min_max_year_set(calendar, 2010, 2020);
-   elm_calendar_min_max_year_get(calendar, &min_year, &max_year);
-   if ((min_year != 2010) || (max_year != 2020))
-     {
-        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_calendar_min_max_year_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set the minimum and maximum
- * values for the year works without segmentation fault
- * @n Input Data:
- * @li NULL instead of the calendar object
- * @li NULL, 2010, -1000000 as the minimum year, greater than 1901
- * @li NULL, 2020, 250000 as the maximum year
- *
- * @procedure
- * @step 1 Call elm_calendar_min_max_year_set with invalid value instead of the calendar object
- * @step 2 Call elm_calendar_min_max_year_set with invalid value instead of the minimum year
- * @step 3 Call elm_calendar_min_max_year_set with invalid value instead of the maximum year
- * @step 4 Call elm_calendar_min_max_year_set with overflowing value instead of the minimum year and the maximum year
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_min_max_year_set_n)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   UNITEST_FUNC_NEG(elm_calendar_min_max_year_set, calendar, 2010, 2020)
-   elm_calendar_min_max_year_set(calendar, -1000000 , 250000);
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_calendar_min_max_year_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_min_max_year_set_p);
-   tcase_add_test(tcase, utc_elm_calendar_min_max_year_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_calendar_min_max_year_set.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_min_max_year_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;
-}
diff --git a/TC/elementary/calendar/utc_elm_calendar_select_mode_get.c b/TC/elementary/calendar/utc_elm_calendar_select_mode_get.c
deleted file mode 100644 (file)
index 058994e..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_select_mode_get elm_calendar_select_mode_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_select_mode_get
- * @{
- * @objective Positive Test case checks if function call with valid values to get
- * the select day mode used and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- *
- * @procedure
- * @step 1 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_DEFAULT)
- * @step 2 Call elm_calendar_select_mode_get with valid values
- * @step 3 Checks return value of the call function
- * @step 4 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_ALWAYS)
- * @step 5 Call elm_calendar_select_mode_get with valid values
- * @step 6 Checks return value of the call function
- * @step 7 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_NONE)
- * @step 8 Call elm_calendar_select_mode_get with valid values
- * @step 9 Checks return value of the call function
- * @step 10 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_ONDEMAND)
- * @step 11 Call elm_calendar_select_mode_get with valid values
- * @step 12 Checks return value of the call function
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_select_mode_get_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-
-   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_DEFAULT);
-
-   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_DEFAULT)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_ALWAYS);
-
-   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_ALWAYS)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_NONE);
-
-   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_NONE)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_ONDEMAND);
-
-   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
-     {
-        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_calendar_select_mode_get
- * @{
- * @objective Negative Test case 1 checks if function call with invalid value and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the calendar object
- *
- * @procedure
- * @step 1 Call elm_calendar_select_mode_get with invalid value instead of the calendar object
- *
- * @passcondition
- * @li Test passes if returned value equal to ELM_CALENDAR_SELECT_MODE_DEFAULT and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_select_mode_get_n)
-{
-
-   if (elm_calendar_select_mode_get(NULL) != ELM_CALENDAR_SELECT_MODE_DEFAULT)
-     {
-        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_calendar_select_mode_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_select_mode_get_p);
-   tcase_add_test(tcase, utc_elm_calendar_select_mode_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_calendar_select_mode_get.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_select_mode_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/calendar/utc_elm_calendar_select_mode_get_set.c b/TC/elementary/calendar/utc_elm_calendar_select_mode_get_set.c
new file mode 100644 (file)
index 0000000..d126624
--- /dev/null
@@ -0,0 +1,187 @@
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+Evas_Object *main_win = NULL, *calendar = NULL;
+
+/**
+ * @addtogroup elm_calendar
+ * @{
+ * @defgroup elm_calendar_select_mode_set elm_calendar_select_mode_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a calendar to 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_show(main_win);
+   calendar = elm_calendar_add(main_win);
+   if (calendar == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
+     }
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_calendar_select_mode_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to get
+ * the select day mode used and without segmentation fault
+ * @n Input Data:
+ * @li the calendar object
+ * @li the select mode to use
+ *
+ * @procedure
+ * @step 1 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_DEFAULT)
+ * @step 2 Call elm_calendar_select_mode_get with valid values
+ * @step 3 Checks return value of the call function
+ * @step 4 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_ALWAYS)
+ * @step 5 Call elm_calendar_select_mode_get with valid values
+ * @step 6 Checks return value of the call function
+ * @step 7 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_NONE)
+ * @step 8 Call elm_calendar_select_mode_get with valid values
+ * @step 9 Checks return value of the call function
+ * @step 10 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_ONDEMAND)
+ * @step 11 Call elm_calendar_select_mode_get with valid values
+ * @step 12 Checks return value of the call function
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_select_mode_set_p)
+{
+   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_DEFAULT);
+
+   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_DEFAULT)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_ALWAYS);
+
+   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_ALWAYS)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_NONE);
+
+   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_NONE)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_ONDEMAND);
+
+   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
+     {
+        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_calendar_select_mode_set
+ * @{
+ * @objective Negative Test case 1 checks if function call with invalid value and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the calendar object
+ * @li ELM_CALENDAR_SELECT_MODE_DEFAULT instead of the select mode
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_select_mode_get with invalid value instead of the calendar object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_select_mode_set_n)
+{
+   elm_calendar_select_mode_set(NULL, ELM_CALENDAR_SELECT_MODE_DEFAULT);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_calendar_select_mode_get
+ * @{
+ * @objective Negative Test case 1 checks if function call with invalid value and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the calendar object
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_select_mode_get with invalid value instead of the calendar object
+ *
+ * @passcondition
+ * @li Test passes if returned value equal to ELM_CALENDAR_SELECT_MODE_DEFAULT and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_select_mode_get_n)
+{
+   if (elm_calendar_select_mode_get(NULL) != ELM_CALENDAR_SELECT_MODE_DEFAULT)
+     {
+        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
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_calendar_select_mode_get_set");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_calendar_select_mode_set_p);
+   tcase_add_test(tcase, utc_elm_calendar_select_mode_set_n);
+   tcase_add_test(tcase, utc_elm_calendar_select_mode_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_calendar_select_mode_get_set.log");
+   srunner_set_xml(srunner, "utc_elm_calendar_select_mode_get_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;
+}
diff --git a/TC/elementary/calendar/utc_elm_calendar_select_mode_set.c b/TC/elementary/calendar/utc_elm_calendar_select_mode_set.c
deleted file mode 100644 (file)
index 81fd493..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_select_mode_set elm_calendar_select_mode_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_select_mode_set
- * @{
- * @objective Positive Test case checks if function call with valid values to get
- * the select day mode used and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li the select mode to use
- *
- * @procedure
- * @step 1 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_DEFAULT)
- * @step 2 Call elm_calendar_select_mode_get with valid values
- * @step 3 Checks return value of the call function
- * @step 4 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_ALWAYS)
- * @step 5 Call elm_calendar_select_mode_get with valid values
- * @step 6 Checks return value of the call function
- * @step 7 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_NONE)
- * @step 8 Call elm_calendar_select_mode_get with valid values
- * @step 9 Checks return value of the call function
- * @step 10 Set select day mode to use(ELM_CALENDAR_SELECT_MODE_ONDEMAND)
- * @step 11 Call elm_calendar_select_mode_get with valid values
- * @step 12 Checks return value of the call function
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_select_mode_set_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-
-   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_DEFAULT);
-
-   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_DEFAULT)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_ALWAYS);
-
-   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_ALWAYS)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_NONE);
-
-   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_NONE)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   elm_calendar_select_mode_set(calendar, ELM_CALENDAR_SELECT_MODE_ONDEMAND);
-
-   if (elm_calendar_select_mode_get(calendar) != ELM_CALENDAR_SELECT_MODE_ONDEMAND)
-     {
-        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_calendar_select_mode_set
- * @{
- * @objective Negative Test case 1 checks if function call with invalid value and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the calendar object
- * @li ELM_CALENDAR_SELECT_MODE_DEFAULT instead of the select mode
- *
- * @procedure
- * @step 1 Call elm_calendar_select_mode_get with invalid value instead of the calendar object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_select_mode_set_n)
-{
-
-   elm_calendar_select_mode_set(NULL, ELM_CALENDAR_SELECT_MODE_DEFAULT);
-
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_calendar_select_mode_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_select_mode_set_p);
-   tcase_add_test(tcase, utc_elm_calendar_select_mode_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_calendar_select_mode_set.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_select_mode_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;
-}
diff --git a/TC/elementary/calendar/utc_elm_calendar_selectable_get.c b/TC/elementary/calendar/utc_elm_calendar_selectable_get.c
deleted file mode 100644 (file)
index ab1d804..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_selectable_get elm_calendar_selectable_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_selectable_get
- * @{
- * @objective Positive Test case checks if function call with valid values to get
- * how elm_calendar_selected_time_set manage a date and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- *
- * @procedure
- * @step 1 Set select day mode to use(ELM_CALENDAR_SELECTABLE_NONE)
- * @step 2 Call elm_calendar_selectable_get with valid values
- * @step 3 Checks return value of the call function
- * @step 4 Set select day mode to use(ELM_CALENDAR_SELECTABLE_YEAR)
- * @step 5 Call elm_calendar_selectable_get with valid values
- * @step 6 Checks return value of the call function
- * @step 7 Set select day mode to use(ELM_CALENDAR_SELECTABLE_MONTH)
- * @step 8 Call elm_calendar_selectable_get with valid values
- * @step 9 Checks return value of the call function
- * @step 10 Set select day mode to use(ELM_CALENDAR_SELECTABLE_DAY)
- * @step 11 Call elm_calendar_selectable_get with valid values
- * @step 12 Checks return value of the call function
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_selectable_get_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-
-   elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_NONE);
-
-   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_NONE)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_YEAR);
-
-   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_YEAR)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-      elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_MONTH);
-
-   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_MONTH)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-      elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_DAY);
-
-   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_DAY)
-     {
-        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_calendar_selectable_get
- * @{
- * @objective Negative Test case 1 checks if function call with invalid value and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the calendar object
- *
- * @procedure
- * @step 1 Call elm_calendar_select_mode_get with invalid value instead of the calendar object
- *
- * @passcondition
- * @li Test passes if returned value equal to ELM_CALENDAR_SELECTABLE_NONE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_selectable_get_n)
-{
-
-   if (elm_calendar_selectable_get(NULL) != ELM_CALENDAR_SELECTABLE_NONE)
-     {
-        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_calendar_selectable_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_selectable_get_p);
-   tcase_add_test(tcase, utc_elm_calendar_selectable_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_calendar_selectable_get.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_selectable_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/calendar/utc_elm_calendar_selectable_get_set.c b/TC/elementary/calendar/utc_elm_calendar_selectable_get_set.c
new file mode 100644 (file)
index 0000000..9d7bbf5
--- /dev/null
@@ -0,0 +1,187 @@
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+Evas_Object *main_win = NULL, *calendar = NULL;
+
+/**
+ * @addtogroup elm_calendar
+ * @{
+ * @defgroup elm_calendar_selectable_set elm_calendar_selectable_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a calendar to 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_show(main_win);
+   calendar = elm_calendar_add(main_win);
+   if (calendar == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
+     }
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_calendar_selectable_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to get
+ * the select day mode used and without segmentation fault
+ * @n Input Data:
+ * @li the calendar object
+ * @li the type of a tm struct
+ *
+ * @procedure
+ * @step 1 Set select day mode to use(ELM_CALENDAR_SELECTABLE_NONE)
+ * @step 2 Call elm_calendar_selectable_get with valid values
+ * @step 3 Checks return value of the call function
+ * @step 4 Set select day mode to use(ELM_CALENDAR_SELECTABLE_YEAR)
+ * @step 5 Call elm_calendar_selectable_get with valid values
+ * @step 6 Checks return value of the call function
+ * @step 7 Set select day mode to use(ELM_CALENDAR_SELECTABLE_MONTH)
+ * @step 8 Call elm_calendar_selectable_get with valid values
+ * @step 9 Checks return value of the call function
+ * @step 10 Set select day mode to use(ELM_CALENDAR_SELECTABLE_DAY)
+ * @step 11 Call elm_calendar_selectable_get with valid values
+ * @step 12 Checks return value of the call function
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_selectable_set_p)
+{
+   elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_NONE);
+
+   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_NONE)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_YEAR);
+
+   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_YEAR)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+      elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_MONTH);
+
+   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_MONTH)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+      elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_DAY);
+
+   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_DAY)
+     {
+        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_calendar_selectable_set
+ * @{
+ * @objective Negative Test case 1 checks if function call with invalid value and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the calendar object
+ * @li ELM_CALENDAR_SELECTABLE_NONE instead of the type of a tm struct
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_selectable_set with invalid value instead of the calendar object
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_selectable_set_n)
+{
+   elm_calendar_selectable_set(NULL, ELM_CALENDAR_SELECTABLE_NONE);
+
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_calendar_selectable_get
+ * @{
+ * @objective Negative Test case 1 checks if function call with invalid value and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the calendar object
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_select_mode_get with invalid value instead of the calendar object
+ *
+ * @passcondition
+ * @li Test passes if returned value equal to ELM_CALENDAR_SELECTABLE_NONE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_selectable_get_n)
+{
+   if (elm_calendar_selectable_get(NULL) != ELM_CALENDAR_SELECTABLE_NONE)
+     {
+        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
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_calendar_selectable_get_set");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_calendar_selectable_set_p);
+   tcase_add_test(tcase, utc_elm_calendar_selectable_set_n);
+   tcase_add_test(tcase, utc_elm_calendar_selectable_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_calendar_selectable_get_set.log");
+   srunner_set_xml(srunner, "utc_elm_calendar_selectable_get_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;
+}
diff --git a/TC/elementary/calendar/utc_elm_calendar_selectable_set.c b/TC/elementary/calendar/utc_elm_calendar_selectable_set.c
deleted file mode 100644 (file)
index 140416e..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_selectable_set elm_calendar_selectable_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_selectable_set
- * @{
- * @objective Positive Test case checks if function call with valid values to get
- * the select day mode used and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li the type of a tm struct
- *
- * @procedure
- * @step 1 Set select day mode to use(ELM_CALENDAR_SELECTABLE_NONE)
- * @step 2 Call elm_calendar_selectable_get with valid values
- * @step 3 Checks return value of the call function
- * @step 4 Set select day mode to use(ELM_CALENDAR_SELECTABLE_YEAR)
- * @step 5 Call elm_calendar_selectable_get with valid values
- * @step 6 Checks return value of the call function
- * @step 7 Set select day mode to use(ELM_CALENDAR_SELECTABLE_MONTH)
- * @step 8 Call elm_calendar_selectable_get with valid values
- * @step 9 Checks return value of the call function
- * @step 10 Set select day mode to use(ELM_CALENDAR_SELECTABLE_DAY)
- * @step 11 Call elm_calendar_selectable_get with valid values
- * @step 12 Checks return value of the call function
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_selectable_set_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-
-   elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_NONE);
-
-   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_NONE)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-   elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_YEAR);
-
-   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_YEAR)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-      elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_MONTH);
-
-   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_MONTH)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
-        return;
-     }
-
-      elm_calendar_selectable_set(calendar, ELM_CALENDAR_SELECTABLE_DAY);
-
-   if (elm_calendar_selectable_get(calendar) != ELM_CALENDAR_SELECTABLE_DAY)
-     {
-        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_calendar_selectable_set
- * @{
- * @objective Negative Test case 1 checks if function call with invalid value and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the calendar object
- * @li ELM_CALENDAR_SELECTABLE_NONE instead of the type of a tm struct
- *
- * @procedure
- * @step 1 Call elm_calendar_selectable_set with invalid value instead of the calendar object
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_selectable_set_n)
-{
-
-   elm_calendar_selectable_set(NULL, ELM_CALENDAR_SELECTABLE_NONE);
-
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_calendar_selectable_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_selectable_set_p);
-   tcase_add_test(tcase, utc_elm_calendar_selectable_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_calendar_selectable_set.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_selectable_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;
-}
diff --git a/TC/elementary/calendar/utc_elm_calendar_selected_time_get.c b/TC/elementary/calendar/utc_elm_calendar_selected_time_get.c
deleted file mode 100644 (file)
index 4fdeea7..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_selected_time_get elm_calendar_selected_time_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_selected_time_get
- * @{
- * @objective Positive Test case checks if function call with valid values to get selected date
- * works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li the pointer to the tm struct to point to selected date
- *
- * @procedure
- * @step 1 Set selected date to be highlighted on calendar
- * @step 2 Call elm_calendar_selected_time_get with valid values
- *
- * @passcondition
- * @li Test passes if returned value is EINA_TRUE and retrieved time is same as the selected time and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_selected_time_get_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   struct tm selected_time = {0}, ret_time = {5, 5, 5, 5, 5, 1995, 5, 5, 0};
-   time_t current_time = 0;
-   struct tm *tm_result = NULL;
-   Eina_Bool ret = EINA_FALSE;
-
-   current_time = time(NULL);
-   tm_result = localtime_r(&current_time, &selected_time);
-   if (tm_result == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
-        return;
-     }
-   elm_calendar_selected_time_set(calendar, &selected_time);
-   ret = elm_calendar_selected_time_get(calendar, &ret_time);
-   if ((ret == EINA_FALSE) || (selected_time.tm_mday != ret_time.tm_mday) || (selected_time.tm_mon != ret_time.tm_mon) || (selected_time.tm_year != ret_time.tm_year))
-     {
-        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_calendar_selected_time_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get selected date
- * on calendar works properly and without segmentation fault
- * @n Input Data:
- * @li NULL, the calendar object
- * @li NULL, the pointer to the tm struct to point to selected date
- *
- * @procedure
- * @step 1 Call elm_calendar_selected_time_get with invalid value instead of the calendar object
- * @step 2 Call elm_calendar_selected_time_get with invalid value instead of the pointer to the tm struct to point to selected date
- *
- * @passcondition
- * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_selected_time_get_n)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   struct tm selected_time = {0};
-   time_t current_time = 0;
-   struct tm *tm_result = NULL;
-
-   current_time = time(NULL);
-   tm_result = localtime_r(&current_time, &selected_time);
-   if (tm_result == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
-        return;
-     }
-   if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_calendar_selected_time_get, calendar, &selected_time))
-     {
-        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_calendar_selected_time_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_selected_time_get_p);
-   tcase_add_test(tcase, utc_elm_calendar_selected_time_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_calendar_selected_time_get.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_selected_time_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/calendar/utc_elm_calendar_selected_time_get_set.c b/TC/elementary/calendar/utc_elm_calendar_selected_time_get_set.c
new file mode 100644 (file)
index 0000000..3039ee7
--- /dev/null
@@ -0,0 +1,191 @@
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+Evas_Object *main_win = NULL, *calendar = NULL;
+
+/**
+ * @addtogroup elm_calendar
+ * @{
+ * @defgroup elm_calendar_selected_time_set elm_calendar_selected_time_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a calendar to 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_show(main_win);
+   calendar = elm_calendar_add(main_win);
+   if (calendar == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
+     }
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_calendar_selected_time_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set selected date to be highlighted
+ * on calendar works properly and without segmentation fault
+ * @n Input Data:
+ * @li the calendar object
+ * @li the pointer to the tm struct to represent the selected date
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_selected_time_set with valid values
+ * @step 2 Get selected date
+ *
+ * @passcondition
+ * @li Test passes if returned value is same as specified value and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_selected_time_set_p)
+{
+   struct tm selected_time = {0}, ret_time = {5, 5, 5, 5, 5, 1995, 5, 5, 0};
+   time_t current_time = 0;
+   struct tm *tm_result = NULL;
+   Eina_Bool ret = EINA_FALSE;
+
+   current_time = time(NULL);
+   tm_result = localtime_r(&current_time, &selected_time);
+   if (tm_result == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
+     }
+   elm_calendar_selected_time_set(calendar, &selected_time);
+   ret = elm_calendar_selected_time_get(calendar, &ret_time);
+   if ((ret == EINA_FALSE) || (selected_time.tm_mday != ret_time.tm_mday) || (selected_time.tm_mon != ret_time.tm_mon) || (selected_time.tm_year != ret_time.tm_year))
+     {
+        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_calendar_selected_time_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set selected date to be highlighted
+ * on calendar works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the calendar object
+ * @li NULL, the pointer to the tm struct to represent the selected date
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_selected_time_set with invalid value instead of the calendar object
+ * @step 2 Call elm_calendar_selected_time_set with invalid value instead of the pointer to the tm struct to represent the selected date
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_selected_time_set_n)
+{
+   struct tm selected_time = {0};
+   time_t current_time = 0;
+   struct tm *tm_result = NULL;
+
+   current_time = time(NULL);
+   tm_result = localtime_r(&current_time, &selected_time);
+   if (tm_result == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
+     }
+   UNITEST_FUNC_NEG(elm_calendar_selected_time_set, calendar, &selected_time)
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_calendar_selected_time_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get selected date
+ * on calendar works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL, the calendar object
+ * @li NULL, the pointer to the tm struct to point to selected date
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_selected_time_get with invalid value instead of the calendar object
+ * @step 2 Call elm_calendar_selected_time_get with invalid value instead of the pointer to the tm struct to point to selected date
+ *
+ * @passcondition
+ * @li Test passes if returned value is EINA_FALSE and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_selected_time_get_n)
+{
+   struct tm selected_time = {0};
+   time_t current_time = 0;
+   struct tm *tm_result = NULL;
+
+   current_time = time(NULL);
+   tm_result = localtime_r(&current_time, &selected_time);
+   if (tm_result == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
+     }
+   if (TEST_FAIL == UNITEST_FUNC_NEG_RET(EINA_FALSE, elm_calendar_selected_time_get, calendar, &selected_time))
+     {
+        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
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_calendar_selected_time_get_set");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_calendar_selected_time_set_p);
+   tcase_add_test(tcase, utc_elm_calendar_selected_time_set_n);
+   tcase_add_test(tcase, utc_elm_calendar_selected_time_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_calendar_selected_time_get_set.log");
+   srunner_set_xml(srunner, "utc_elm_calendar_selected_time_get_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;
+}
diff --git a/TC/elementary/calendar/utc_elm_calendar_selected_time_set.c b/TC/elementary/calendar/utc_elm_calendar_selected_time_set.c
deleted file mode 100644 (file)
index b28d244..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-Evas_Object *main_win = NULL, *calendar = NULL;
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_selected_time_set elm_calendar_selected_time_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_selected_time_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set selected date to be highlighted
- * on calendar works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li the pointer to the tm struct to represent the selected date
- *
- * @procedure
- * @step 1 Call elm_calendar_selected_time_set with valid values
- * @step 2 Get selected date
- *
- * @passcondition
- * @li Test passes if returned value is same as specified value and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_selected_time_set_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   struct tm selected_time = {0}, ret_time = {5, 5, 5, 5, 5, 1995, 5, 5, 0};
-   time_t current_time = 0;
-   struct tm *tm_result = NULL;
-   Eina_Bool ret = EINA_FALSE;
-
-   current_time = time(NULL);
-   tm_result = localtime_r(&current_time, &selected_time);
-   if (tm_result == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
-        return;
-     }
-   elm_calendar_selected_time_set(calendar, &selected_time);
-   ret = elm_calendar_selected_time_get(calendar, &ret_time);
-   if ((ret == EINA_FALSE) || (selected_time.tm_mday != ret_time.tm_mday) || (selected_time.tm_mon != ret_time.tm_mon) || (selected_time.tm_year != ret_time.tm_year))
-     {
-        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_calendar_selected_time_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set selected date to be highlighted
- * on calendar works without segmentation fault
- * @n Input Data:
- * @li NULL, the calendar object
- * @li NULL, the pointer to the tm struct to represent the selected date
- *
- * @procedure
- * @step 1 Call elm_calendar_selected_time_set with invalid value instead of the calendar object
- * @step 2 Call elm_calendar_selected_time_set with invalid value instead of the pointer to the tm struct to represent the selected date
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_selected_time_set_n)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   struct tm selected_time = {0};
-   time_t current_time = 0;
-   struct tm *tm_result = NULL;
-
-   current_time = time(NULL);
-   tm_result = localtime_r(&current_time, &selected_time);
-   if (tm_result == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : localtime_r function returned an error..", __FILE__, __LINE__);
-        return;
-     }
-   UNITEST_FUNC_NEG(elm_calendar_selected_time_set, calendar, &selected_time)
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_calendar_selected_time_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_selected_time_set_p);
-   tcase_add_test(tcase, utc_elm_calendar_selected_time_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_calendar_selected_time_set.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_selected_time_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;
-}
diff --git a/TC/elementary/calendar/utc_elm_calendar_weekdays_names_get.c b/TC/elementary/calendar/utc_elm_calendar_weekdays_names_get.c
deleted file mode 100644 (file)
index 9a16bfd..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-
-#define WEEKDAYS_SIZE (sizeof weekdays / sizeof weekdays[0])
-Evas_Object *main_win = NULL, *calendar = NULL;
-const char* weekdays[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_weekdays_names_get elm_calendar_weekdays_names_get()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_weekdays_names_get
- * @{
- * @objective Positive Test case checks if function call with valid value to get weekdays names
- * displayed by the calendar works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- *
- * @procedure
- * @step 1 Set weekdays names to be displayed by the calendar
- * @step 2 Call elm_calendar_weekdays_names_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_calendar_weekdays_names_get_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   const char **ret_weekdays = NULL;
-   int i = 0;
-
-   elm_calendar_weekdays_names_set(calendar, weekdays);
-   ret_weekdays = elm_calendar_weekdays_names_get(calendar);
-   for (; i < WEEKDAYS_SIZE; i++)
-     {
-        if ((ret_weekdays[i] == NULL) || (strcmp(ret_weekdays[i], weekdays[i]) != 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_calendar_weekdays_names_get
- * @{
- * @objective Negative Test case checks if function call with invalid value to get weekdays names
- * displayed by the calendar works properly and without segmentation fault
- * @n Input Data:
- * @li NULL instead of the calendar object
- *
- * @procedure
- * @step 1 Call elm_calendar_weekdays_names_get with invalid value instead of the calendar object
- *
- * @passcondition
- * @li Test passes if returned value is NULL and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_weekdays_names_get_n)
-{
-   if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_calendar_weekdays_names_get, calendar))
-     {
-        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_calendar_weekdays_names_get");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_weekdays_names_get_p);
-   tcase_add_test(tcase, utc_elm_calendar_weekdays_names_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_calendar_weekdays_names_get.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_weekdays_names_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/calendar/utc_elm_calendar_weekdays_names_get_set.c b/TC/elementary/calendar/utc_elm_calendar_weekdays_names_get_set.c
new file mode 100644 (file)
index 0000000..d133792
--- /dev/null
@@ -0,0 +1,167 @@
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+
+#define WEEKDAYS_SIZE (sizeof weekdays / sizeof weekdays[0])
+Evas_Object *main_win = NULL, *calendar = NULL;
+const char* weekdays[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
+
+/**
+ * @addtogroup elm_calendar
+ * @{
+ * @defgroup elm_calendar_weekdays_names_set elm_calendar_weekdays_names_set()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create a main window
+ * @step 3 Add a calendar to 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_show(main_win);
+   calendar = elm_calendar_add(main_win);
+   if (calendar == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
+     }
+}
+
+static void
+teardown(void)
+{
+   if (main_win != NULL)
+     {
+        evas_object_del(main_win);
+        main_win = NULL;
+     }
+   elm_shutdown();
+   printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_calendar_weekdays_names_set
+ * @{
+ * @objective Positive Test case checks if function call with valid values to set weekdays names
+ * to be displayed by the calendar works properly and without segmentation fault
+ * @n Input Data:
+ * @li the calendar object
+ * @li the array of seven strings to be used as weekday names
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_weekdays_names_set with valid values
+ * @step 2 Get weekdays names displayed by the calendar
+ *
+ * @passcondition
+ * @li Test passes if returned values is same as specified values and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_weekdays_names_set_p)
+{
+   const char **ret_weekdays = NULL;
+   int i = 0;
+
+   elm_calendar_weekdays_names_set(calendar, weekdays);
+   ret_weekdays = elm_calendar_weekdays_names_get(calendar);
+   for (; i < WEEKDAYS_SIZE; i++)
+     {
+        if ((ret_weekdays[i] == NULL) || (strcmp(ret_weekdays[i], weekdays[i]) != 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_calendar_weekdays_names_set
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to set weekdays names
+ * to be displayed by the calendar works without segmentation fault
+ * @n Input Data:
+ * @li NULL, the calendar object
+ * @li NULL, the array of seven strings to be used as weekday names
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_weekdays_names_set with invalid value instead of the calendar object
+ * @step 2 Call elm_calendar_weekdays_names_set with invalid value instead of the array of seven strings to be used as weekday names
+ *
+ * @passcondition
+ * @li Test passes if there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_weekdays_names_set_n)
+{
+   UNITEST_FUNC_NEG(elm_calendar_weekdays_names_set, calendar, weekdays)
+   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ * @addtogroup elm_calendar_weekdays_names_get
+ * @{
+ * @objective Negative Test case checks if function call with invalid value to get weekdays names
+ * displayed by the calendar works properly and without segmentation fault
+ * @n Input Data:
+ * @li NULL instead of the calendar object
+ *
+ * @procedure
+ * @step 1 Call elm_calendar_weekdays_names_get with invalid value instead of the calendar object
+ *
+ * @passcondition
+ * @li Test passes if returned value is NULL and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_calendar_weekdays_names_get_n)
+{
+   if (TEST_FAIL == UNITEST_FUNC_NEG_RET(NULL, elm_calendar_weekdays_names_get, calendar))
+     {
+        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
+
+/**
+ * @}
+ */
+Suite *
+test_suite(void)
+{
+   Suite *suite = suite_create("utc_elm_calendar_weekdays_names_get_set");
+
+   TCase *tcase = tcase_create("TCase");
+   tcase_set_timeout(tcase, 30);
+   tcase_add_checked_fixture(tcase, setup, teardown);
+   tcase_add_test(tcase, utc_elm_calendar_weekdays_names_set_p);
+   tcase_add_test(tcase, utc_elm_calendar_weekdays_names_set_n);
+   tcase_add_test(tcase, utc_elm_calendar_weekdays_names_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_calendar_weekdays_names_get_set.log");
+   srunner_set_xml(srunner, "utc_elm_calendar_weekdays_names_get_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;
+}
diff --git a/TC/elementary/calendar/utc_elm_calendar_weekdays_names_set.c b/TC/elementary/calendar/utc_elm_calendar_weekdays_names_set.c
deleted file mode 100644 (file)
index 5f2acf9..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-#include <check.h>
-#include <Elementary.h>
-#include "../../utc_negative_unitest.h"
-
-#define WEEKDAYS_SIZE (sizeof weekdays / sizeof weekdays[0])
-Evas_Object *main_win = NULL, *calendar = NULL;
-const char* weekdays[] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
-
-/**
- * @addtogroup elm_calendar
- * @{
- * @defgroup elm_calendar_weekdays_names_set elm_calendar_weekdays_names_set()
- *
- * @precondition
- * @step 1 Initialize Elementary
- * @step 2 Create a main window
- * @step 3 Add a calendar to 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__);
-        return;
-     }
-   evas_object_show(main_win);
-   calendar = elm_calendar_add(main_win);
-   if (calendar == NULL)
-     {
-        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a calendar object to the main window..", __FILE__, __LINE__);
-        return;
-     }
-}
-
-static void
-teardown(void)
-{
-   if (main_win != NULL)
-     {
-        evas_object_del(main_win);
-        main_win = NULL;
-     }
-   elm_shutdown();
-   printf(" ============ Cleanup ============ \n");
-}
-
-/**
- * @addtogroup elm_calendar_weekdays_names_set
- * @{
- * @objective Positive Test case checks if function call with valid values to set weekdays names
- * to be displayed by the calendar works properly and without segmentation fault
- * @n Input Data:
- * @li the calendar object
- * @li the array of seven strings to be used as weekday names
- *
- * @procedure
- * @step 1 Call elm_calendar_weekdays_names_set with valid values
- * @step 2 Get weekdays names displayed by the calendar
- *
- * @passcondition
- * @li Test passes if returned values is same as specified values and there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_weekdays_names_set_p)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   const char **ret_weekdays = NULL;
-   int i = 0;
-
-   elm_calendar_weekdays_names_set(calendar, weekdays);
-   ret_weekdays = elm_calendar_weekdays_names_get(calendar);
-   for (; i < WEEKDAYS_SIZE; i++)
-     {
-        if ((ret_weekdays[i] == NULL) || (strcmp(ret_weekdays[i], weekdays[i]) != 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_calendar_weekdays_names_set
- * @{
- * @objective Negative Test case checks if function call with invalid value to set weekdays names
- * to be displayed by the calendar works without segmentation fault
- * @n Input Data:
- * @li NULL, the calendar object
- * @li NULL, the array of seven strings to be used as weekday names
- *
- * @procedure
- * @step 1 Call elm_calendar_weekdays_names_set with invalid value instead of the calendar object
- * @step 2 Call elm_calendar_weekdays_names_set with invalid value instead of the array of seven strings to be used as weekday names
- *
- * @passcondition
- * @li Test passes if there is no segmentation fault
- * @}
- */
-START_TEST(utc_elm_calendar_weekdays_names_set_n)
-{
-   if (main_win == NULL || calendar == NULL)
-     {
-        return;
-     }
-
-   UNITEST_FUNC_NEG(elm_calendar_weekdays_names_set, calendar, weekdays)
-   printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
-}
-END_TEST
-
-/**
- * @}
- */
-Suite *
-test_suite(void)
-{
-   Suite *suite = suite_create("utc_elm_calendar_weekdays_names_set");
-
-   TCase *tcase = tcase_create("TCase");
-   tcase_set_timeout(tcase, 30);
-   tcase_add_checked_fixture(tcase, setup, teardown);
-   tcase_add_test(tcase, utc_elm_calendar_weekdays_names_set_p);
-   tcase_add_test(tcase, utc_elm_calendar_weekdays_names_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_calendar_weekdays_names_set.log");
-   srunner_set_xml(srunner, "utc_elm_calendar_weekdays_names_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;
-}