tst_QMap: replace QVERIFY(x == y) with QCOMPARE(x,y)

QCOMPARE produces more useful output on failure.

Change-Id: Idaa9bf61a22a43b0feb084a71985a69c8787d633
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Marc Mutz 2014-07-25 14:33:01 +02:00
parent 34237d62f6
commit 67a316be7c

View File

@ -1181,8 +1181,8 @@ void tst_QMap::initializerList()
#ifdef Q_COMPILER_INITIALIZER_LISTS
QMap<int, QString> map = {{1, "bar"}, {1, "hello"}, {2, "initializer_list"}};
QCOMPARE(map.count(), 2);
QVERIFY(map[1] == "hello");
QVERIFY(map[2] == "initializer_list");
QCOMPARE(map[1], QString("hello"));
QCOMPARE(map[2], QString("initializer_list"));
// note the difference to std::map:
// std::map<int, QString> stdm = {{1, "bar"}, {1, "hello"}, {2, "initializer_list"}};