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 <kai.koehne@theqtcompany.com>
This commit is contained in:
parent
2fe56e37ed
commit
4b8ba3c91a
@ -628,8 +628,8 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge
|
||||
QList<QByteArray> res = splitLines(actualOutputs[n]);
|
||||
const QString expectedFileName = expectedFileNameFromTest(subdir, logger);
|
||||
QList<QByteArray> 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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user