-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
+
-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
+
-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
+
-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
+
+++ /dev/null
-#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;
-}
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;
}
}
*/
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;
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__);
}
*/
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;
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__);
}
+++ /dev/null
-#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;
-}
--- /dev/null
+#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;
+}
+++ /dev/null
-#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;
-}
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;
}
}
*/
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__);
}
*/
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__);
}
+++ /dev/null
-#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;
-}
--- /dev/null
+#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;
+}
+++ /dev/null
-#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;
-}
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;
}
}
*/
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};
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)
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__);
}
*/
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;
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);
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);
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(¤t_time, &selected_time);
{
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;
}
}
*/
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;
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);
{
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__);
}
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(¤t_time, &selected_time);
{
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;
}
}
*/
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;
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__);
}
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(¤t_time, &selected_time);
{
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;
}
}
*/
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__);
}
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(¤t_time, &selected_time);
{
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;
}
}
*/
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;
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__);
}
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__);
}
+++ /dev/null
-#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;
-}
--- /dev/null
+#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;
+}
+++ /dev/null
-#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;
-}
+++ /dev/null
-#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;
-}
--- /dev/null
+#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;
+}
+++ /dev/null
-#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;
-}
+++ /dev/null
-#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;
-}
--- /dev/null
+#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;
+}
+++ /dev/null
-#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;
-}
+++ /dev/null
-#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(¤t_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(¤t_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;
-}
--- /dev/null
+#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(¤t_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(¤t_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(¤t_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;
+}
+++ /dev/null
-#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(¤t_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(¤t_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;
-}
+++ /dev/null
-#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;
-}
--- /dev/null
+#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;
+}
+++ /dev/null
-#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;
-}