Permalink
Browse files

Expand test generator to support test_*to

  • Loading branch information...
1 parent b7f998c commit 740a0a8c27f802bc8e7438dfbff34e2ea61dd267 @caio committed Mar 28, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/check_fuzzyclock.c
View
@@ -32,6 +32,12 @@ void fuzzy_time_test_gen(int hour, int min, int start, int end,
clock->tm_min = min;
clock->tm_hour = hour;
+ // The expected hour on the fuzzy output in this
+ // case is the next hour
+ if (!iter_on_hour && start >= 33) {
+ hour++;
+ }
+
for (i = start; i < end; i++) {
if (iter_on_hour) { clock->tm_hour = i; }
else { clock->tm_min = i; }

0 comments on commit 740a0a8

Please sign in to comment.