EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS Base Release-Candidate Double Feature!
From: Andrew Johnson <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Fri, 11 Nov 2016 14:43:24 -0600
Hi Freddie,

On 11/10/2016 05:52 PM, [email protected] wrote:
> epicsStdioTest.c plans 166 tests on Windows but 163 otherwise, if I
> build using Visual Studio 2010 instead 166 tests passed OK. On
> further investigation it seems the issue occurs within
> testEpicsSnprintf() and is due to Microsoft changing (fixing) the
> formatting  of "%8.2e" by sprint():
> 
> In Visual Studio 2010 this generates    1.23e+004
> In Visual Studio 2015 this generates    1.23e+04

Thanks for the report. Does this patch make the test pass on both compilers?

=== modified file 'src/libCom/test/epicsStdioTest.c'
--- src/libCom/test/epicsStdioTest.c    2012-02-03 22:12:06 +0000
+++ src/libCom/test/epicsStdioTest.c    2016-11-11 20:40:36 +0000
@@ -39,6 +39,11 @@
     int size;
     int rtn, rlen;

+#if defined(WIN32) && \
+    (!defined(_MINGW) || __MSVCRT_VERSION__ >= 0x0800)
+    _set_output_format(_TWO_DIGIT_EXPONENT);
+#endif
+
     sprintf(exbuffer, format, ivalue, fvalue, svalue);
     rlen = strlen(expected)+1;

@@ -122,11 +127,7 @@

 MAIN(epicsStdioTest)
 {
-#ifdef _WIN32
-    testPlan(166);
-#else
     testPlan(163);
-#endif
     testEpicsSnprintf();
     testStdoutRedir("report");
     return testDone();


- Andrew


-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

Replies:
RE: EPICS Base Release-Candidate Double Feature! freddie.akeroyd
References:
EPICS Base Release-Candidate Double Feature! Andrew Johnson
RE: EPICS Base Release-Candidate Double Feature! freddie.akeroyd

Navigate by Date:
Prev: RE: FLOOR function in EPICS CALC error Mooney, Tim M.
Next: Re: motor6-10 - thread hijack to "synApps documentation" Pete Jemian
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: EPICS Base Release-Candidate Double Feature! freddie.akeroyd
Next: RE: EPICS Base Release-Candidate Double Feature! freddie.akeroyd
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 12 Nov 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·