summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2019-03-20 20:49:27 -0700
committerFred Wright <fw@fwright.net>2019-03-21 20:04:24 -0700
commit6c668bb9a4e8b29b18f0557774f2f68448f06ce1 (patch)
treec9d59103738db0b58e55892a0922c634bdacb08e /tests
parenta5eb095bb28cb41e0425207a527bf66800a317cd (diff)
downloadgpsd-6c668bb9a4e8b29b18f0557774f2f68448f06ce1.tar.gz
time-regress: Add test for NaN case.
This was punted when fixing the NaN case, due to the failure to notice that a NaN constant was available with unexpected capitalization. Now the test exists. TESTED: The new test fails with an intentionally incorrect expected value, and passes with the correct expectation.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_mktime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_mktime.c b/tests/test_mktime.c
index 0ad7b5d2..ca692722 100644
--- a/tests/test_mktime.c
+++ b/tests/test_mktime.c
@@ -113,6 +113,9 @@ static struct
/* the end of time: 2038 */
{(timestamp_t)2147483647.123456, "2038-01-19T03:14:07.123Z"},
{(timestamp_t)2147483648.123456, "2038-01-19T03:14:08.123Z"},
+
+ /* test the NaN case */
+ {(timestamp_t)NAN, "NaN"},
};
/* Skip test if value is out of time_t range */