diff options
Diffstat (limited to 'tests/auto/qml/qmltc_qprocess')
-rw-r--r-- | tests/auto/qml/qmltc_qprocess/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/auto/qml/qmltc_qprocess/data/inlineComponent.qml | 5 | ||||
-rw-r--r-- | tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp | 11 |
3 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/qml/qmltc_qprocess/CMakeLists.txt b/tests/auto/qml/qmltc_qprocess/CMakeLists.txt index 4e467cf2e4..e6a031ddcf 100644 --- a/tests/auto/qml/qmltc_qprocess/CMakeLists.txt +++ b/tests/auto/qml/qmltc_qprocess/CMakeLists.txt @@ -11,6 +11,7 @@ qt6_add_qml_module(tst_qmltc_qprocess URI QmltcQProcessTests QML_FILES data/dummy.qml + data/inlineComponent.qml ) add_dependencies(tst_qmltc_qprocess Qt::qmltc) diff --git a/tests/auto/qml/qmltc_qprocess/data/inlineComponent.qml b/tests/auto/qml/qmltc_qprocess/data/inlineComponent.qml new file mode 100644 index 0000000000..f8515b6d1b --- /dev/null +++ b/tests/auto/qml/qmltc_qprocess/data/inlineComponent.qml @@ -0,0 +1,5 @@ +import QtQml +QtObject { + component InlineType : QtObject { } + property QtObject dummy: InlineType {} +} diff --git a/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp b/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp index 37acf9223a..6f12e585ba 100644 --- a/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp +++ b/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp @@ -67,6 +67,7 @@ private slots: void sanity(); void noBuiltins(); void noQtQml(); + void inlineComponent(); }; void tst_qmltc_qprocess::initTestCase() @@ -85,7 +86,8 @@ void tst_qmltc_qprocess::initTestCase() QVERIFY(QDir(m_tmpPath).removeRecursively()); // in case it's already there QVERIFY(QDir().mkpath(m_tmpPath)); - m_resourcePaths = { { u"dummy.qml"_qs, u"data/dummy.qml"_qs } }; + m_resourcePaths = { { u"dummy.qml"_qs, u"data/dummy.qml"_qs }, + { u"inlineComponent.qml"_qs, u"data/inlineComponent.qml"_qs } }; } void tst_qmltc_qprocess::cleanupTestCase() @@ -189,5 +191,12 @@ void tst_qmltc_qprocess::noQtQml() QVERIFY(errors.contains(u"Failed to import QtQml. Are your include paths set up properly?"_qs)); } +void tst_qmltc_qprocess::inlineComponent() +{ + const auto errors = runQmltc(u"inlineComponent.qml"_qs, false); + QEXPECT_FAIL("", "qmltc does not support inline components at the moment", Continue); + QVERIFY(!errors.contains(u"Inline components are not supported"_qs)); +} + QTEST_MAIN(tst_qmltc_qprocess) #include "tst_qmltc_qprocess.moc" |