Permalink
Browse files

Implement test_*to tests

  • Loading branch information...
caio committed Mar 28, 2012
1 parent 740a0a8 commit 7f2e4a35b6c14b84383970bc619aba10f0cb004c
Showing with 32 additions and 0 deletions.
  1. +32 −0 tests/check_fuzzyclock.c
View
@@ -89,20 +89,52 @@ START_TEST(test_halfpast) {
}
END_TEST
+START_TEST(test_twentyfiveto) {
+ fuzzy_time_test_gen(1, 0, 33, 38, "twenty five to %s", 0);
+}
+END_TEST
+
+START_TEST(test_twentyto) {
+ fuzzy_time_test_gen(1, 0, 38, 43, "twenty to %s", 0);
+}
+END_TEST
+
+START_TEST(test_quarterto) {
+ fuzzy_time_test_gen(1, 0, 43, 48, "quarter to %s", 0);
+}
+END_TEST
+
+START_TEST(test_tento) {
+ fuzzy_time_test_gen(1, 0, 48, 53, "ten to %s", 0);
+}
+END_TEST
+
+START_TEST(test_fiveto) {
+ fuzzy_time_test_gen(1, 0, 53, 58, "five to %s", 0);
+}
+END_TEST
+
Suite* fuzzy_suite(void) {
Suite* suite = suite_create("fuzzyclock");
TCase* tc_core = tcase_create("Core");
tcase_add_test(tc_core, test_get_hour_string);
tcase_add_test(tc_core, test_oclock);
+
tcase_add_test(tc_core, test_fivepast);
tcase_add_test(tc_core, test_tenpast);
tcase_add_test(tc_core, test_quarterpast);
tcase_add_test(tc_core, test_twentypast);
tcase_add_test(tc_core, test_twentyfivepast);
tcase_add_test(tc_core, test_halfpast);
+ tcase_add_test(tc_core, test_twentyfiveto);
+ tcase_add_test(tc_core, test_twentyto);
+ tcase_add_test(tc_core, test_quarterto);
+ tcase_add_test(tc_core, test_tento);
+ tcase_add_test(tc_core, test_fiveto);
+
suite_add_tcase(suite, tc_core);
return suite;

0 comments on commit 7f2e4a3

Please sign in to comment.