return 0;
}
+#endif
+
+#ifndef BEFORE_AUG_2026
+#define SIX_HOURS 21600
+#define NINE_HOURS 32400
+#define THIRTY_MINUTES 1800
+
+time_t get_break_time(const time_t worktime)
+{
+ if (worktime >= SIX_HOURS && worktime < NINE_HOURS)
+ return THIRTY_MINUTES;
+
+ return 0;
+}
#endif
\ No newline at end of file
return cmocka_run_group_tests(break_tests, NULL, NULL);
}
+#endif
+
+#ifndef BEFORE_AUG_2026
+void six_to_nine_hour_thirdy_minutes_break_test(time_t worktime)
+{
+ const time_t breaktime = get_break_time(worktime);
+
+ assert_int_equal(breaktime, 1800);
+}
+
+void six_to_nine_hour_thirdy_minutes_break_tests()
+{
+ const time_t six_hour = 21600;
+ const time_t nine_hour = 32400;
+
+ for (time_t i = six_hour; i < nine_hour; i++) {
+ six_to_nine_hour_thirdy_minutes_break_test(i);
+ }
+}
+
+int run_break_tests()
+{
+ const struct CMUnitTest break_tests[] = {
+ cmocka_unit_test(six_to_nine_hour_thirdy_minutes_break_tests)
+ };
+
+ return cmocka_run_group_tests(break_tests, NULL, NULL);
+}
#endif
\ No newline at end of file