52 fail_unless(
get_month_name(-1) == NULL,
"getting month name for negative value should bring a NULL");
54 fail_unless(
get_month_name(0) != NULL,
"getting month name for correct value should bring a non NULL season name");
59 fail_unless(
get_weekday(-1) == NULL,
"getting week day name for negative value should bring a NULL");
61 fail_unless(
get_weekday(0) != NULL,
"getting weekday name for correct value should bring a non NULL season name");
66 fail_unless(
get_season_name(-1) == NULL,
"getting season name for negative value should bring a NULL");
70 fail_unless(
get_season_name(0) != NULL,
"getting season name for correct value should bring a non NULL season name");
75 Suite *s = suite_create(
"time");
76 TCase *tc_core = tcase_create(
"Core");
81 suite_add_tcase(s, tc_core);
82 tcase_add_test(tc_core, test_get_month_name);
83 tcase_add_test(tc_core, test_get_season_name);
84 tcase_add_test(tc_core, test_get_weekday);
92 SRunner *sr = srunner_create(s);
94 srunner_set_xml(sr, LOGDIR
"/unit/common/time.xml");
95 srunner_set_log(sr, LOGDIR
"/unit/common/time.out");
96 srunner_run_all(sr, CK_ENV);
97 nf = srunner_ntests_failed(sr);
99 return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;