summaryrefslogtreecommitdiff
path: root/tests/auto/corelib/tools/qline/tst_qline.cpp
diff options
context:
space:
mode:
authorTatiana Borisova <tatiana.borisova@qt.io>2022-02-01 13:26:17 +0200
committerTatiana Borisova <tatiana.borisova@qt.io>2022-02-15 00:48:23 +0200
commit23fd249b85f6fd5e6c51b7f969460dab60c2554a (patch)
tree139b03ffed21fd578fdcfdf3c3c7a9e5c30e0d85 /tests/auto/corelib/tools/qline/tst_qline.cpp
parent7794421bea8550d16ad6209536909931709045bb (diff)
downloadqtbase-23fd249b85f6fd5e6c51b7f969460dab60c2554a.tar.gz
Exclude denormal test cases if system doesn't support it
- current INTEGRITY development pack don't support denormals for float and double. All values are rounded to 0. Task-number: QTBUG-99123 Pick-to: 6.2 6.3 Change-Id: Iaaacdc4210c7ac2ec3ec337c61164a1ade0efb01 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qline/tst_qline.cpp')
-rw-r--r--tests/auto/corelib/tools/qline/tst_qline.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qline/tst_qline.cpp b/tests/auto/corelib/tools/qline/tst_qline.cpp
index ad8438dfe9..67e71dfb26 100644
--- a/tests/auto/corelib/tools/qline/tst_qline.cpp
+++ b/tests/auto/corelib/tools/qline/tst_qline.cpp
@@ -269,6 +269,13 @@ void tst_QLine::testLength()
QCOMPARE(l.length(), qreal(length));
l.setLength(lengthToSet);
+
+ if constexpr (std::numeric_limits<double>::has_denorm != std::denorm_present) {
+ if (qstrcmp(QTest::currentDataTag(), "[tiny,tiny]->|2| (-tiny/2,-tiny/2)") == 0
+ || qstrcmp(QTest::currentDataTag(), "[4e-323,5e-324]|1892|") == 0) {
+ QSKIP("Skipping 'denorm' as this type lacks denormals on this system");
+ }
+ }
// Scaling tiny values up to big can be imprecise: don't try to test vx, vy
if (length > 0 && qFuzzyIsNull(length)) {
QVERIFY(l.length() > lengthToSet / 2 && l.length() < lengthToSet * 2);