From f1439f8b1c5ee21285415344fc1aac9562ca0dbd Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 15 Nov 2016 09:56:42 -0600 Subject: [PATCH] Fix epicsStdioTest for MS 2015 compiler --- src/libCom/test/epicsStdioTest.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/libCom/test/epicsStdioTest.c b/src/libCom/test/epicsStdioTest.c index 54fc3a48a..a2c57ecac 100644 --- a/src/libCom/test/epicsStdioTest.c +++ b/src/libCom/test/epicsStdioTest.c @@ -38,7 +38,14 @@ static void testEpicsSnprintf(void) { const char *expected = exbuffer; int size; int rtn, rlen; - + +#ifdef _WIN32 +#if (defined(_MSC_VER) && _MSC_VER < 1900) || \ + (defined(_MINGW) && defined(_TWO_DIGIT_EXPONENT)) + _set_output_format(_TWO_DIGIT_EXPONENT); +#endif +#endif + sprintf(exbuffer, format, ivalue, fvalue, svalue); rlen = strlen(expected)+1; @@ -122,11 +129,7 @@ void testStdoutRedir (const char *report) MAIN(epicsStdioTest) { -#ifdef _WIN32 - testPlan(166); -#else testPlan(163); -#endif testEpicsSnprintf(); testStdoutRedir("report"); return testDone();