From: Giuseppe D'Angelo Date: Mon, 9 Apr 2012 18:14:31 +0000 (+0100) Subject: QSharedPointer: hash autotest fix X-Git-Tag: 071012110112~1235^2^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8427ff09ab7ce15b7b9ecc60514aec8dd2b6a24f;p=profile%2Fivi%2Fqtbase.git 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 Reviewed-by: Thiago Macieira --- diff --git a/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp index f8b9abb..bb9be1d 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()