diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp | 18 |
2 files changed, 18 insertions, 3 deletions
diff --git a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp index 8c8ab81..16a621a 100644 --- a/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp +++ b/tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp @@ -1669,6 +1669,9 @@ void tst_QGraphicsAnchorLayout::floatConflict() void tst_QGraphicsAnchorLayout::infiniteMaxSizes() { + if (sizeof(qreal) <= 4) { + QSKIP("qreal has too little precision, result will be wrong", SkipAll); + } QGraphicsAnchorLayout *l = new QGraphicsAnchorLayout; l->setContentsMargins(0, 0, 0, 0); l->setSpacing(0); diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp index 7cacd85..7880d2d 100644 --- a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp +++ b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp @@ -1525,7 +1525,11 @@ void tst_QGraphicsAnchorLayout1::testMulti_data() } - QTest::newRow("Linear multi") << QSizeF(width, height) << theData << theResult; + if (sizeof(qreal) == 4) { + qDebug("Linear multi: Skipping! (qreal has too little precision, result will be wrong)"); + } else { + QTest::newRow("Linear multi") << QSizeF(width, height) << theData << theResult; + } } // Multiple widgets, V shape @@ -1595,7 +1599,11 @@ void tst_QGraphicsAnchorLayout1::testMulti_data() } } - QTest::newRow("V multi") << QSizeF(width, height) << theData << theResult; + if (sizeof(qreal) == 4) { + qDebug("V multi: Skipping! (qreal has too little precision, result will be wrong)"); + } else { + QTest::newRow("V multi") << QSizeF(width, height) << theData << theResult; + } } // Multiple widgets, grid @@ -1653,7 +1661,11 @@ void tst_QGraphicsAnchorLayout1::testMulti_data() << BasicResult(i, QRectF(((i%d)+1)*horizontalStep, ((i/d)+1)*verticalStep, horizontalStep, verticalStep) ); } - QTest::newRow("Grid multi") << QSizeF(200, 100) << theData << theResult; + if (sizeof(qreal) == 4) { + qDebug("Grid multi: Skipping! (qreal has too little precision, result will be wrong)"); + } else { + QTest::newRow("Grid multi") << QSizeF(200, 100) << theData << theResult; + } } } |