aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 2fc5129230..88c4e2375f 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -112,6 +112,7 @@ private slots:
void functionTakingVar();
void getOptionalLookup();
void getOptionalLookup_data();
+ void getOptionalLookupOnQJSValueNonStrict();
void globals();
void idAccess();
void ignoredFunctionReturn();
@@ -2112,6 +2113,18 @@ void tst_QmlCppCodegen::getOptionalLookup()
QCOMPARE(actual, expected);
}
+void tst_QmlCppCodegen::getOptionalLookupOnQJSValueNonStrict()
+{
+ QQmlEngine engine;
+ const QUrl document(u"qrc:/qt/qml/TestTypes/GetOptionalLookupOnQJSValueNonStrict.qml"_s);
+ QQmlComponent c(&engine, document);
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(o);
+
+ QVERIFY(o->property("b").toBool());
+}
+
void tst_QmlCppCodegen::globals()
{
QQmlEngine engine;