Skip to content

Commit

Permalink
Increase coverage in t_misc
Browse files Browse the repository at this point in the history
  • Loading branch information
npmccallum committed Oct 21, 2017
1 parent ad922f9 commit 3565ec6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions t_misc.c
Expand Up @@ -45,6 +45,22 @@ int main(int argc, const char **argv)
assert(iso8601_compare(&ta, &tb) > 0);
iso8601_from_time_t(b + 1, ta.usecond, false, 0, &tb);
assert(iso8601_compare(&ta, &tb) < 0);
assert(iso8601_compare(&(iso8601_time) { 2000, 1, 1 },
&(iso8601_time) { 2000, 2, 1 }) < 0);
assert(iso8601_compare(&(iso8601_time) { 2000, 2, 1 },
&(iso8601_time) { 2000, 1, 1 }) > 0);
assert(iso8601_compare(&(iso8601_time) { 2000, 1, 1 },
&(iso8601_time) { 2000, 1, 2 }) < 0);
assert(iso8601_compare(&(iso8601_time) { 2000, 1, 2 },
&(iso8601_time) { 2000, 1, 1 }) > 0);
assert(iso8601_compare(&(iso8601_time) { 2000, 1, 1, 0 },
&(iso8601_time) { 2000, 1, 1, 1 }) < 0);
assert(iso8601_compare(&(iso8601_time) { 2000, 1, 1, 1 },
&(iso8601_time) { 2000, 1, 1, 0 }) > 0);
assert(iso8601_compare(&(iso8601_time) { 2000, 1, 1, 0, 0 },
&(iso8601_time) { 2000, 1, 1, 0, 1 }) < 0);
assert(iso8601_compare(&(iso8601_time) { 2000, 1, 1, 0, 1 },
&(iso8601_time) { 2000, 1, 1, 0, 0 }) > 0);


/*
Expand Down

0 comments on commit 3565ec6

Please sign in to comment.