summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/serialization/json/tst_qtjson.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-05-04 11:33:10 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-05-04 17:38:40 +0200
commit0f7987f0c934b311bd39a5a496ffb0c6128eb8df (patch)
treedea392deb3c43e377a224271c4f450dcff3fc76f /tests/auto/corelib/serialization/json/tst_qtjson.cpp
parentea7d85457d30e915ad470919d2e74867cba9cad8 (diff)
parentf0ea852d4dd6b3139869a952ee92e74cd367866d (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
Diffstat (limited to 'tests/auto/corelib/serialization/json/tst_qtjson.cpp')
-rw-r--r--tests/auto/corelib/serialization/json/tst_qtjson.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/corelib/serialization/json/tst_qtjson.cpp b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
index a167612b52..cfe70932b3 100644
--- a/tests/auto/corelib/serialization/json/tst_qtjson.cpp
+++ b/tests/auto/corelib/serialization/json/tst_qtjson.cpp
@@ -987,9 +987,16 @@ void tst_QtJson::testObjectIteration()
QCOMPARE(object, object2);
QJsonObject::iterator it = object2.find(QString::number(5));
+ QJsonValue val = *it;
object2.erase(it);
QCOMPARE(object.size(), 10);
QCOMPARE(object2.size(), 9);
+
+ for (QJsonObject::const_iterator it = object2.constBegin(); it != object2.constEnd(); ++it) {
+ QJsonValue value = it.value();
+ QVERIFY(it.value() != val);
+ QCOMPARE((double)it.key().toInt(), value.toDouble());
+ }
}
{