diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 1a0d211989..c017ba140f 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -141,6 +141,7 @@ private slots: void inaccessibleProperty(); void typePropagationLoop(); void signatureIgnored(); + void listAsArgument(); }; void tst_QmlCppCodegen::initTestCase() @@ -2750,6 +2751,21 @@ void tst_QmlCppCodegen::signatureIgnored() QCOMPARE(ignored->property("n").toInt(), 67); } +void tst_QmlCppCodegen::listAsArgument() +{ + QQmlEngine engine; + + QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/listAsArgument.qml"_s)); + QVERIFY2(c.isReady(), qPrintable(c.errorString())); + + QScopedPointer<QObject> o(c.create()); + QCOMPARE(o->property("i").toInt(), 4); + QCOMPARE(o->property("j").toInt(), 2); + QCOMPARE(o->property("i1").toInt(), 2); + QCOMPARE(o->property("i2").toInt(), 4); + QCOMPARE(o->property("d").value<QObject *>()->objectName(), u"this one"_s); +} + QTEST_MAIN(tst_QmlCppCodegen) #include "tst_qmlcppcodegen.moc" |
