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.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index db9701d033..2ccd104ed9 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -42,6 +42,7 @@ private slots:
void attachedType();
void badSequence();
void basicBlocksWithBackJump();
+ void basicDTZ();
void bindToValueType();
void bindingExpression();
void blockComments();
@@ -735,6 +736,23 @@ void tst_QmlCppCodegen::basicBlocksWithBackJump()
QVERIFY(!expectingMessage);
}
+void tst_QmlCppCodegen::basicDTZ()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, QUrl(u"qrc:/qt/qml/TestTypes/basicDTZ.qml"_s));
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
+ QScopedPointer<QObject> o(component.create());
+ QVERIFY(!o.isNull());
+
+ QCOMPARE(o->property("title").toString(), u"none");
+
+ QMetaObject::invokeMethod(o.data(), "t1");
+ QMetaObject::invokeMethod(o.data(), "t2");
+ QMetaObject::invokeMethod(o.data(), "t3");
+
+ QCOMPARE(o->property("title").toString(), u"Baz 41");
+}
+
void tst_QmlCppCodegen::bindToValueType()
{
QQmlEngine engine;