48 fail_unless(
get_month_name(-1) == NULL,
"getting month name for negative value should bring a NULL");
50 fail_unless(
get_month_name(0) != NULL,
"getting month name for correct value should bring a non NULL season name");
55 fail_unless(
get_weekday(-1) == NULL,
"getting week day name for negative value should bring a NULL");
57 fail_unless(
get_weekday(0) != NULL,
"getting weekday name for correct value should bring a non NULL season name");
62 fail_unless(
get_season_name(-1) == NULL,
"getting season name for negative value should bring a NULL");
67 fail_unless(
get_season_name(0) != NULL,
"getting season name for correct value should bring a non NULL season name");
72 Suite *s = suite_create(
"time");
73 TCase *tc_core = tcase_create(
"Core");
78 suite_add_tcase(s, tc_core);
79 tcase_add_test(tc_core, test_get_month_name);
80 tcase_add_test(tc_core, test_get_season_name);
81 tcase_add_test(tc_core, test_get_weekday);
89 SRunner *sr = srunner_create(s);
91 srunner_set_xml(sr, LOGDIR
"/unit/common/time.xml");
92 srunner_set_log(sr, LOGDIR
"/unit/common/time.out");
93 srunner_run_all(sr, CK_ENV);
94 nf = srunner_ntests_failed(sr);
96 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
const char * get_season_name(const int index)
const char * get_weekday(const int index)
START_TEST(test_get_month_name)
const char * get_month_name(const int index)
END_TEST Suite * time_suite(void)