summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-04-09 16:32:30 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-04-10 08:51:55 +0000
commitcb3402e024245ee63c7680b7cd11c3dcf872141a (patch)
tree9d5d661cc529f1829dc36f6a84c24a7742216c56 /tests/auto
parent96084bf2a900dd94c2aa4eaf65b1733875b7ae4e (diff)
Fix non-functional checks in surfaceviewer autotest
Change-Id: If40c25e1b51fc1261079a214c222618d301f7d06 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/surfaceviewer/tst_surfaceviewer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/surfaceviewer/tst_surfaceviewer.cpp b/tests/auto/surfaceviewer/tst_surfaceviewer.cpp
index a06f9c6..f9590f2 100644
--- a/tests/auto/surfaceviewer/tst_surfaceviewer.cpp
+++ b/tests/auto/surfaceviewer/tst_surfaceviewer.cpp
@@ -204,16 +204,16 @@ void tst_SurfaceViewer::testGrab()
QCOMPARE(fullImage.size(), w.size() * w.devicePixelRatio());
// verify at least that the background is there
QColor c = fullImage.pixel(5, 5);
- qFuzzyCompare(float(c.redF()), 0.929412f);
- qFuzzyCompare(float(c.greenF()), 0.956863f);
- qFuzzyCompare(float(c.blueF()), 0.34902f);
+ QVERIFY(qFuzzyCompare(float(c.redF()), 0.929412f));
+ QVERIFY(qFuzzyCompare(float(c.greenF()), 0.956863f));
+ QVERIFY(qFuzzyCompare(float(c.blueF()), 0.34902f));
QImage partialImage = viewer.grab(QRect(10, 10, 100, 100));
QCOMPARE(partialImage.size(), QSize(100, 100));
c = fullImage.pixel(5, 5);
- qFuzzyCompare(float(c.redF()), 0.929412f);
- qFuzzyCompare(float(c.greenF()), 0.956863f);
- qFuzzyCompare(float(c.blueF()), 0.34902f);
+ QVERIFY(qFuzzyCompare(float(c.redF()), 0.929412f));
+ QVERIFY(qFuzzyCompare(float(c.greenF()), 0.956863f));
+ QVERIFY(qFuzzyCompare(float(c.blueF()), 0.34902f));
}
QTEST_MAIN(tst_SurfaceViewer)