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 823f79c269..0fd90e90fd 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -1121,6 +1121,18 @@ void tst_QmlCppCodegen::confusedModule() QTest::ignoreMessage(QtDebugMsg, "Hello from Test"); QScopedPointer<QObject> object(component.create()); QVERIFY(!object.isNull()); + + QQmlComponent component2(&engine, QUrl(u"qrc:/qt/qml/Confused/Main2.qml"_s)); + QVERIFY2(!component2.isError(), component2.errorString().toUtf8()); + + // TODO: We would like to have a better error here, but we currently cannot propagate it. + QTest::ignoreMessage( + QtWarningMsg, + "qrc:/qt/qml/Confused/Main2.qml:5: " + "TypeError: Property 'Print' of object Broken is not a function"); + + QScopedPointer<QObject> object2(component2.create()); + QVERIFY(!object2.isNull()); } void tst_QmlCppCodegen::consoleObject() |
