summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsanchorlayout1
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-01-13 16:51:18 +0100
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-01-13 16:51:18 +0100
commit6921f084df93fce24417f6a24764665cebe3da1a (patch)
tree940278158a69409b2715e3ba411ed83b2600175b /tests/auto/qgraphicsanchorlayout1
parent06828a0ecb3f1e6c4bd3a17ef4a5cd37dd4d7dda (diff)
Disable some tests that require high floating point precision.
Disable them if sizeof(qreal)==4
Diffstat (limited to 'tests/auto/qgraphicsanchorlayout1')
-rw-r--r--tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp b/tests/auto/qgraphicsanchorlayout1/tst_qgraphicsanchorlayout1.cpp
index 7cacd852a5..7880d2dc33 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;
+ }
}
}