diff --git a/modules/libcom/test/epicsCalcTest.cpp b/modules/libcom/test/epicsCalcTest.cpp index 2492c95ba..25701b153 100644 --- a/modules/libcom/test/epicsCalcTest.cpp +++ b/modules/libcom/test/epicsCalcTest.cpp @@ -612,18 +612,12 @@ MAIN(epicsCalcTest) testExpr(0.0 + NaN); testExpr(Inf + 0.0); testExpr(Inf + Inf); -#if defined(_WIN64) && defined(_MSC_VER) + // only test CALC as MSVC seems to incorrectly evaluate this expression at compile time. + // see note in epicsMathTest testCalc("Inf + -Inf", NaN); -#else - testExpr(Inf + -Inf); -#endif testExpr(Inf + NaN); testExpr(-Inf + 0.0); -#if defined(_WIN64) && defined(_MSC_VER) testCalc("-Inf + Inf", NaN); -#else - testExpr(-Inf + Inf); -#endif testExpr(-Inf + -Inf); testExpr(-Inf + NaN); testExpr(NaN + 0.0); diff --git a/modules/libcom/test/epicsMathTest.c b/modules/libcom/test/epicsMathTest.c index 8ea763cf0..6d1fb85e8 100644 --- a/modules/libcom/test/epicsMathTest.c +++ b/modules/libcom/test/epicsMathTest.c @@ -32,23 +32,23 @@ MAIN(epicsMathTest) testOk1(epicsINF > 0.0); testOk1(epicsINF - epicsINF != 0.0); -#if defined(_WIN64) && defined(_MSC_VER) - testTodoBegin("Known failure on windows-x64"); +#if defined(_MSC_VER) + testTodoBegin("Known failure on windows (MSVC optimizer bug?)"); #endif testOk1(epicsINF + -epicsINF != 0.0); testOk1(-epicsINF + epicsINF != 0.0); -#if defined(_WIN64) && defined(_MSC_VER) +#if defined(_MSC_VER) testTodoEnd(); #endif testOk1(isnan(epicsINF - epicsINF)); -#if defined(_WIN64) && defined(_MSC_VER) - testTodoBegin("Known failure on windows-x64"); +#if defined(_MSC_VER) + testTodoBegin("Known failure on windows (MSVC optimizer bug?)"); #endif testOk1(isnan(epicsINF + -epicsINF)); testOk1(isnan(-epicsINF + epicsINF)); -#if defined(_WIN64) && defined(_MSC_VER) +#if defined(_MSC_VER) testTodoEnd(); #endif @@ -62,12 +62,12 @@ MAIN(epicsMathTest) testOk1(!(epicsNAN > epicsNAN)); testOk1(isnan(epicsNAN - epicsNAN)); -#if defined(_WIN64) && defined(_MSC_VER) - testTodoBegin("Known failure on windows-x64"); +#if defined(_MSC_VER) + testTodoBegin("Known failure on windows (MSVC optimizer bug?)"); #endif testOk1(isnan(epicsNAN + -epicsNAN)); testOk1(isnan(-epicsNAN + epicsNAN)); -#if defined(_WIN64) && defined(_MSC_VER) +#if defined(_MSC_VER) testTodoEnd(); #endif