From 8149a6cd1010ce607302772dc1f964536b415a5b Mon Sep 17 00:00:00 2001
From: Pim van Pelt <pim@ipng.nl>
Date: Sun, 4 Nov 2018 19:56:08 +0100
Subject: [PATCH] add timespec_empty() unit test

---
 unittest/test_timespec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/unittest/test_timespec.c b/unittest/test_timespec.c
index fc36023..b2f43e4 100644
--- a/unittest/test_timespec.c
+++ b/unittest/test_timespec.c
@@ -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");