Autotest: make the test pass with the Intel compiler
The Intel compiler defaults to "fast math" mode, which is why those tests had been failing. So for the test that is trying to check whether we conform to IEEE strict requirements, turn on strict requirements. Change-Id: I02f8426b1c8e4241ac10ffff13e8efa224f313b2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
b2be272d35
commit
94e364464e
@ -3,3 +3,5 @@ TARGET = tst_qnumeric
|
||||
QT = core testlib
|
||||
SOURCES = tst_qnumeric.cpp
|
||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
||||
intel_icc: QMAKE_CXXFLAGS += -fp-model strict
|
||||
intel_icl: QMAKE_CXXFLAGS += /fp:strict
|
||||
|
@ -107,13 +107,7 @@ void tst_QNumeric::qNan()
|
||||
QVERIFY(qIsInf(-inf));
|
||||
QVERIFY(qIsInf(2*inf));
|
||||
QCOMPARE(1/inf, 0.0);
|
||||
#ifdef Q_CC_INTEL
|
||||
QEXPECT_FAIL("", "ICC optimizes zero * anything to zero", Continue);
|
||||
#endif
|
||||
QVERIFY(qIsNaN(0*nan));
|
||||
#ifdef Q_CC_INTEL
|
||||
QEXPECT_FAIL("", "ICC optimizes zero * anything to zero", Continue);
|
||||
#endif
|
||||
QVERIFY(qIsNaN(0*inf));
|
||||
QVERIFY(qFuzzyCompare(1/inf, 0.0));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user