From 4b8ba3c91a06447a28a21da9bb276ce9a9d124a8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 17 Jul 2015 12:06:18 +0200 Subject: Fix sub test float of tests/auto/testlib/selftests/tst_selftests for MSVC 2015. From MSVC 2015 onwards, MSVC formats floats using printf("%g") like g++, so the fiddling of the expected output needs to restricted accordingly. Change-Id: I6e7f78e5e90f70886a8b2ef37c0fb9bf82b5e1a3 Reviewed-by: Kai Koehne --- tests/auto/testlib/selftests/tst_selftests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 5e97a9cfe4..9b76bca28c 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -628,8 +628,8 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge QList res = splitLines(actualOutputs[n]); const QString expectedFileName = expectedFileNameFromTest(subdir, logger); QList exp = expectedResult(expectedFileName); -#if defined (Q_CC_MSVC) || defined(Q_CC_MINGW) - // MSVC, MinGW format double numbers differently +#if (defined (Q_CC_MSVC) && _MSC_VER < 1900)|| defined(Q_CC_MINGW) + // MSVC up to MSVC2013, MinGW format double numbers differently if (n == 0 && subdir == QStringLiteral("float")) { for (int i = 0; i < exp.size(); ++i) { exp[i].replace("e-07", "e-007"); -- cgit v1.2.3