From 94e364464ee162ac919a66a44e27ee9adda65c77 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 18 Jun 2015 13:39:20 -0700 Subject: 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 --- tests/auto/corelib/global/qnumeric/qnumeric.pro | 2 ++ tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/auto/corelib/global/qnumeric/qnumeric.pro b/tests/auto/corelib/global/qnumeric/qnumeric.pro index 4cfb3fa7ac..00f3635be9 100644 --- a/tests/auto/corelib/global/qnumeric/qnumeric.pro +++ b/tests/auto/corelib/global/qnumeric/qnumeric.pro @@ -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 diff --git a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp index 9a50df379c..fdc8bc6aab 100644 --- a/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp +++ b/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp @@ -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)); } -- cgit v1.2.3