diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-12-19 15:22:51 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-20 06:17:42 +0100 |
commit | 85a77cd5c8f4a9a2e71676ff7b600ba891983115 (patch) | |
tree | 42757b4bcd9b8f9702e11fbf70e8ad573d49d1b2 /tests/auto/gui/image | |
parent | 1749fef3c5c1dda98c6ea32e0ac17202892fc9fe (diff) |
Retire QTest::pixmapsAreEqual().
QTest::pixmapsAreEqual() was left in the Qt4 API for compatibility with
some old tests written for Qt3. QCOMPARE() is the preferred way to
compare QPixmaps and provides superior diagnostic output when a
comparison fails.
This commit removes QTest::pixmapsAreEqual() from the testlib API and
replaces the last few remaining calls with QCOMPARE.
Change-Id: I051c0e7d3bda072855fcd262d82e8e540619233b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/gui/image')
-rw-r--r-- | tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index c15d1e6976..8d575c90c0 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -329,7 +329,7 @@ void tst_QPixmap::convertFromImage() pix = QPixmap::fromImage(img2); QPixmap res = QPixmap::fromImage(img2); - QVERIFY( pixmapsAreEqual(&pix, &res) ); + QCOMPARE(pix, res); } void tst_QPixmap::scroll_data() @@ -1149,7 +1149,7 @@ void tst_QPixmap::copy() trans.fill(Qt::transparent); QPixmap transCopy = trans.copy(); - QVERIFY(pixmapsAreEqual(&trans, &transCopy)); + QCOMPARE(trans, transCopy); } void tst_QPixmap::depthOfNullObjects() @@ -1317,7 +1317,7 @@ void tst_QPixmap::loadFromDataImage() QPixmap directLoadingPixmap; directLoadingPixmap.loadFromData(rawData); - QVERIFY(pixmapsAreEqual(&pixmapWithCopy, &directLoadingPixmap)); + QCOMPARE(pixmapWithCopy, directLoadingPixmap); } void tst_QPixmap::fromImageReader_data() @@ -1348,7 +1348,7 @@ void tst_QPixmap::fromImageReader() QPixmap directLoadingPixmap = QPixmap::fromImageReader(&imageReader); - QVERIFY(pixmapsAreEqual(&pixmapWithCopy, &directLoadingPixmap)); + QCOMPARE(pixmapWithCopy, directLoadingPixmap); } void tst_QPixmap::fromImageReaderAnimatedGif_data() @@ -1376,7 +1376,7 @@ void tst_QPixmap::fromImageReaderAnimatedGif() QPixmap refPixmap = QPixmap::fromImage(refImage); QPixmap directLoadingPixmap = QPixmap::fromImageReader(&pixmapReader); - QVERIFY(pixmapsAreEqual(&refPixmap, &directLoadingPixmap)); + QCOMPARE(refPixmap, directLoadingPixmap); } } |