summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-06-18 13:39:20 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-06-19 23:22:34 +0000
commit94e364464ee162ac919a66a44e27ee9adda65c77 (patch)
treecc33fb10426741612eff9132f0da406ac4f5e585
parentb2be272d354defaebd82dfaa2dffefa5a8f3a303 (diff)
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>
-rw-r--r--tests/auto/corelib/global/qnumeric/qnumeric.pro2
-rw-r--r--tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp6
2 files changed, 2 insertions, 6 deletions
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));
}