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:
parent
34237d62f6
commit
67a316be7c
@ -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"}};
|
||||
|
Loading…
Reference in New Issue
Block a user