diff options
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp')
-rw-r--r-- | tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp index 5cff44c3cc..6ccfc77c25 100644 --- a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp +++ b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp @@ -1720,6 +1720,14 @@ void tst_qqmlvaluetypes::sequences() for (int i = 0; i < objSet.size(); ++i) QCOMPARE(value.property(i).property("point").property("x").toInt(), a.point().x()); } + { + MyTypeObject a, b, c; + QSet<MyTypeObject*> container{&a, &b, &c}; + QJSValue value = engine.toScriptValue(container); + QCOMPARE(value.property("length").toInt(), container.size()); + for (int i = 0; i < container.size(); ++i) + QCOMPARE(value.property(i).property("point").property("x").toInt(), a.point().x()); + } } struct StringLessGadget { Q_GADGET |