summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-07-25 14:23:20 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-07-25 14:52:40 +0200
commit443bc6ab188c5107f8ac0a068dc3bf12b4809355 (patch)
tree4da3d5e53df5909e970990fdae959aa53024aeaa
parent8b0cc9db9b5b09b00e573d1dc0dbfcca177c8a9d (diff)
tst_QHash: replace QVERIFY(x == y) with QCOMPARE(x,y)
QCOMPARE produces more useful output on failure. Change-Id: I584a5d33026ac2587758d72524f735937029e111 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
-rw-r--r--tests/auto/corelib/tools/qhash/tst_qhash.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
index 9c9e8ad635..77baed87c2 100644
--- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp
+++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp
@@ -1329,8 +1329,8 @@ void tst_QHash::initializerList()
#ifdef Q_COMPILER_INITIALIZER_LISTS
QHash<int, QString> hash = {{1, "bar"}, {1, "hello"}, {2, "initializer_list"}};
QCOMPARE(hash.count(), 2);
- QVERIFY(hash[1] == "hello");
- QVERIFY(hash[2] == "initializer_list");
+ QCOMPARE(hash[1], QString("hello"));
+ QCOMPARE(hash[2], QString("initializer_list"));
// note the difference to std::unordered_map:
// std::unordered_map<int, QString> stdh = {{1, "bar"}, {1, "hello"}, {2, "initializer_list"}};