From a710bff122062101f462f0cdfcf308b56eb23612 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 2 Jan 2007 19:30:04 +0000 Subject: [PATCH] Fixed testPlan, added test for %% in strtfime format strings. --- src/libCom/test/epicsTimeTest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libCom/test/epicsTimeTest.cpp b/src/libCom/test/epicsTimeTest.cpp index e7b1e779b..45ca892ac 100644 --- a/src/libCom/test/epicsTimeTest.cpp +++ b/src/libCom/test/epicsTimeTest.cpp @@ -7,7 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * Authors: Jeff HIll and Marty Kraimer + * Authors: Jeff Hill, Marty Kraimer and Andrew Johnson */ #include #include @@ -46,7 +46,7 @@ MAIN(epicsTimeTest) const int nTimes = 10; const double precisionEPICS = 1.0 / nSecPerSec; - testPlan(7 + nTimes * 18); + testPlan(10 + nTimes * 18); const epicsTime begin = epicsTime::getCurrent(); { @@ -104,6 +104,10 @@ MAIN(epicsTimeTest) pFormat = "%S.%05f"; et.strftime(smbuf, sizeof(smbuf), pFormat); testOk(strcmp(smbuf, "00.*") == 0, "'%s' => '%s'", pFormat, smbuf); + + pFormat = "%%S.%%05f"; + et.strftime(buf, sizeof(buf), pFormat); + testOk(strcmp(buf, "%S.%05f") == 0, "'%s' => '%s'", pFormat, buf); } { // invalidFormatTest