From 85a77cd5c8f4a9a2e71676ff7b600ba891983115 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 19 Dec 2011 15:22:51 +1000 Subject: 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 --- tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/auto/gui/image') 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); } } -- cgit v1.2.3