From 9596f591b694babfa9a4afcee47b66ed318fee39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 22 Mar 2012 01:19:34 +0100 Subject: 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 --- tests/auto/corelib/tools/qmap/tst_qmap.cpp | 6 ++++-- 1 file 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 -- cgit v1.2.3