summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qmap/tst_qmap.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-03-22 01:19:34 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-28 09:36:33 +0200
commit9596f591b694babfa9a4afcee47b66ed318fee39 (patch)
tree4fefa54dce318d17f61e2b588f6ceb14ca32b00d /tests/auto/corelib/tools/qmap/tst_qmap.cpp
parentbc4f74f5863fc0d6cad891632019c37a9e38617d (diff)
Fix loop conditions, after warnings from clang
tst_qmap.cpp:697:43: warning: inequality comparison result unused tst_qmap.cpp:717:50: warning: inequality comparison result unused Change-Id: I300f9e10b7748306b99c3c8c38f3cc2661a569ad Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qmap/tst_qmap.cpp')
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
index ac75c0e5bd..a28ea94aa5 100644
--- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp
+++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
@@ -694,8 +694,9 @@ void tst_QMap::iterators()
stlIt--;
QVERIFY(stlIt.value() == "Teststring 3");
- for(stlIt = map.begin(), i = 1; stlIt != map.end(), i < 100; ++stlIt, ++i)
+ for(stlIt = map.begin(), i = 1; stlIt != map.end(); ++stlIt, ++i)
QVERIFY(stlIt.value() == testString.arg(i));
+ QCOMPARE(i, 100);
//STL-Style const-iterators
@@ -714,8 +715,9 @@ void tst_QMap::iterators()
cstlIt--;
QVERIFY(cstlIt.value() == "Teststring 3");
- for(cstlIt = map.constBegin(), i = 1; cstlIt != map.constEnd(), i < 100; ++cstlIt, ++i)
+ for(cstlIt = map.constBegin(), i = 1; cstlIt != map.constEnd(); ++cstlIt, ++i)
QVERIFY(cstlIt.value() == testString.arg(i));
+ QCOMPARE(i, 100);
//Java-Style iterators