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.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index e2c353fb60..b2bc02399f 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -270,6 +270,7 @@ private slots:
void undefinedToDouble();
void unknownAttached();
void unknownParameter();
+ void unknownUnderlyingType();
void unstoredUndefined();
void unusedAttached();
void urlString();
@@ -5513,6 +5514,16 @@ void tst_QmlCppCodegen::unknownParameter()
QCOMPARE(object->property("cppProp").toInt(), 18);
}
+void tst_QmlCppCodegen::unknownUnderlyingType()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, QUrl(u"qrc:/qt/qml/TestTypes/unknownUnderlyingType.qml"_s));
+ QVERIFY2(!component.isError(), component.errorString().toUtf8());
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+ QCOMPARE(object->property("foo").toInt(), 11);
+}
+
void tst_QmlCppCodegen::unstoredUndefined()
{
QQmlEngine engine;