From 67323441ec002b7088f662015b50c7eea1a507c7 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 4 Oct 2016 16:17:45 +0200 Subject: [PATCH] libCom/test: add roundtrip test for epicsTime from/to UTC struct tm conversion --- src/libCom/test/epicsTimeTest.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libCom/test/epicsTimeTest.cpp b/src/libCom/test/epicsTimeTest.cpp index 83d0a8a07..823f57b6f 100644 --- a/src/libCom/test/epicsTimeTest.cpp +++ b/src/libCom/test/epicsTimeTest.cpp @@ -48,7 +48,7 @@ MAIN(epicsTimeTest) const int wasteTime = 100000; const int nTimes = 10; - testPlan(15 + nTimes * 18); + testPlan(15 + nTimes * 19); try { const epicsTimeStamp epochTS = {0, 0}; @@ -205,6 +205,11 @@ MAIN(epicsTimeTest) epicsTime beginANSI = ansiDate; testOk1(beginANSI + diff == now); + // test struct gmtm round-trip conversion + gm_tm_nano_sec ansiGmDate = begin; + epicsTime beginGMANSI = ansiGmDate; + testOk1(beginGMANSI + diff == now); + // test struct timespec round-trip conversion struct timespec ts = begin; epicsTime beginTS = ts;