summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2012-04-09 19:14:31 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-13 17:05:11 +0200
commit8427ff09ab7ce15b7b9ecc60514aec8dd2b6a24f (patch)
tree9bf899880fe736f9e5cdda284bb11f5803dfb63c /tests/auto/corelib
parentbcedd0e2427ccd213553d976e28f7d1a8f3b0ceb (diff)
QSharedPointer: hash autotest fix
The hash autotest is wrong: it assumed that the iterator on the hash would reach the end after iterating on two elements with identical key. But three elements were added to that hash, and the third one can appear after the other two. That code path is left for the map test only. Change-Id: I51de7987e2b132b6caff7bb4bac6a57fb7fcb530 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
index f8b9abb359..bb9be1d65f 100644
--- a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
@@ -1623,7 +1623,8 @@ void hashAndMapTest()
QVERIFY(it != c.end());
QCOMPARE(it.key(), k1);
++it;
- QVERIFY(it == c.end());
+ if (Ordered)
+ QVERIFY(it == c.end());
}
void tst_QSharedPointer::map()