summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image/qicon/tst_qicon.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-30 15:15:12 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-31 08:29:15 +0000
commit3859b304e846b4ee8e77350945b6c63bbb487e13 (patch)
tree27b80f83147341f0927d5fcea08718ba97bf530d /tests/auto/gui/image/qicon/tst_qicon.cpp
parent7b6be75796fd51b320ea3bf4dceb88c561ce29a6 (diff)
tests/auto/gui: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: I624deb320c378c18a29b3707f48583d53bfd5186 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'tests/auto/gui/image/qicon/tst_qicon.cpp')
-rw-r--r--tests/auto/gui/image/qicon/tst_qicon.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/gui/image/qicon/tst_qicon.cpp b/tests/auto/gui/image/qicon/tst_qicon.cpp
index 32e5d7a841..9ed3873682 100644
--- a/tests/auto/gui/image/qicon/tst_qicon.cpp
+++ b/tests/auto/gui/image/qicon/tst_qicon.cpp
@@ -348,10 +348,10 @@ void tst_QIcon::cacheKey()
qint64 icon1_key = icon1.cacheKey();
QIcon icon2 = icon1;
- QVERIFY(icon2.cacheKey() == icon1.cacheKey());
+ QCOMPARE(icon2.cacheKey(), icon1.cacheKey());
icon2.detach();
QVERIFY(icon2.cacheKey() != icon1.cacheKey());
- QVERIFY(icon1.cacheKey() == icon1_key);
+ QCOMPARE(icon1.cacheKey(), icon1_key);
}
void tst_QIcon::detach()
@@ -368,7 +368,7 @@ void tst_QIcon::detach()
img1 = icon1.pixmap(32, 32).toImage();
img2 = icon2.pixmap(32, 32).toImage();
- QVERIFY(img1 == img2);
+ QCOMPARE(img1, img2);
}
void tst_QIcon::addFile()
@@ -556,7 +556,7 @@ void tst_QIcon::fromTheme()
QString firstSearchPath = QLatin1String(":/icons");
QString secondSearchPath = QLatin1String(":/second_icons");
QIcon::setThemeSearchPaths(QStringList() << firstSearchPath << secondSearchPath);
- QVERIFY(QIcon::themeSearchPaths().size() == 2);
+ QCOMPARE(QIcon::themeSearchPaths().size(), 2);
QCOMPARE(firstSearchPath, QIcon::themeSearchPaths()[0]);
QCOMPARE(secondSearchPath, QIcon::themeSearchPaths()[1]);
@@ -593,7 +593,7 @@ void tst_QIcon::fromTheme()
// Test non existing icon with fallback
noIcon = QIcon::fromTheme("broken-icon", abIcon);
- QVERIFY(noIcon.cacheKey() == abIcon.cacheKey());
+ QCOMPARE(noIcon.cacheKey(), abIcon.cacheKey());
// Test svg-only icon
noIcon = QIcon::fromTheme("svg-icon", abIcon);