add timespec_empty() unit test
This commit is contained in:
@ -100,12 +100,14 @@ static void test_timespec_state(void) {
|
||||
ASSERT(ts, "Created timespec");
|
||||
timespec_get_spec(ts, buf, sizeof(buf)-1);
|
||||
ASSERT(0 == strcmp(buf, ""), "timespec_get_spec() didn't match input spec(s)");
|
||||
ASSERT(true == timespec_empty(ts), "timespec_empty() wasn't true");
|
||||
|
||||
ASSERT(timespec_add_spec(ts, "08-10"), "Added timespec");
|
||||
ASSERT(timespec_add_spec(ts, "12:00-13:00"), "Added timespec");
|
||||
ASSERT(timespec_add_spec(ts, "14:11:05-14:59:52"), "Added timespec");
|
||||
ASSERT(timespec_add_spec(ts, "23:01:02-01:02:03"), "Added timespec");
|
||||
ASSERT(!timespec_add_spec(ts, "14:60-15:01"), "Illegal timespec");
|
||||
ASSERT(false == timespec_empty(ts), "timespec_empty() was't false");
|
||||
|
||||
target.tm_sec = 59; target.tm_min = 59; target.tm_hour = 7;
|
||||
ASSERT(!timespec_match(ts, &target), "No match at 07:59:59");
|
||||
|
Reference in New Issue
Block a user