diff options
Diffstat (limited to 'tests/auto/corelib/json/tst_qtjson.cpp')
-rw-r--r-- | tests/auto/corelib/json/tst_qtjson.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp index 73b79b1607..7a11b5aec2 100644 --- a/tests/auto/corelib/json/tst_qtjson.cpp +++ b/tests/auto/corelib/json/tst_qtjson.cpp @@ -550,6 +550,11 @@ void TestQtJson::testValueRef() QJsonValue val = object[QLatin1String("null")]; QCOMPARE(val.toDouble(), 100.); QCOMPARE(object.size(), 2); + + array[1] = array[2] = object[QLatin1String("key")] = 42; + QCOMPARE(array[1], array[2]); + QCOMPARE(array[2], object[QLatin1String("key")]); + QCOMPARE(object.value(QLatin1String("key")), QJsonValue(42)); } void TestQtJson::testObjectIteration() |