diff options
author | David Faure <faure@kde.org> | 2011-02-08 15:33:42 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-02-08 15:46:36 (GMT) |
commit | a6ccb1a72173cec6381d519a720dc08cfdc03720 (patch) | |
tree | cf7d0be782905a1de36ca326895a25c458329445 /tests | |
parent | 97c07046f9031f19005e7f57fc0dee09437f378b (diff) | |
download | Qt-a6ccb1a72173cec6381d519a720dc08cfdc03720.zip Qt-a6ccb1a72173cec6381d519a720dc08cfdc03720.tar.gz Qt-a6ccb1a72173cec6381d519a720dc08cfdc03720.tar.bz2 |
Fix compilation of QMutableSetIterator::value() with QT_STRICT_ITERATORS
Merge-request: 1078
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qset/tst_qset.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qset/tst_qset.cpp b/tests/auto/qset/tst_qset.cpp index 204ca55..164bf1e 100644 --- a/tests/auto/qset/tst_qset.cpp +++ b/tests/auto/qset/tst_qset.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +//#define QT_STRICT_ITERATORS #include <QtTest/QtTest> #include <qset.h> @@ -815,6 +816,16 @@ void tst_QSet::javaMutableIterator() int sum = 0; QMutableSetIterator<QString> i(set1); while (i.hasNext()) { + i.next(); + sum += toNumber(i.value()); + } + QVERIFY(sum == 24999 * 25000 / 2); + } + + { + int sum = 0; + QMutableSetIterator<QString> i(set1); + while (i.hasNext()) { sum += toNumber(i.peekNext()); i.next(); } |