diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 980ff1986b..fb1ab69c71 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -194,6 +194,7 @@ private slots: void propertyOfParent(); void reduceWithNullThis(); void readEnumFromInstance(); + void readonlyListProperty(); void registerElimination(); void registerPropagation(); void renameAdjust(); @@ -4025,6 +4026,17 @@ void tst_QmlCppCodegen::readEnumFromInstance() QCOMPARE(result, 0); } +void tst_QmlCppCodegen::readonlyListProperty() +{ + QQmlEngine engine; + QQmlComponent component(&engine, QUrl(u"qrc:/qt/qml/TestTypes/readonlyListProperty.qml"_s)); + QVERIFY2(component.isReady(), component.errorString().toUtf8()); + QScopedPointer<QObject> object(component.create()); + QVERIFY(!object.isNull()); + + QCOMPARE(object->property("l").toInt(), 4); +} + void tst_QmlCppCodegen::registerElimination() { QQmlEngine engine; |
