diff options
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r-- | tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index e32fa884a2..8adcbc1837 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -111,6 +111,7 @@ private slots: void bindJSValueToType(); void bindTypeToJSValue(); void customParserTypes(); + void customParserTypeInInlineComponent(); void rootAsQmlComponent(); void rootItemIsComponent(); void inlineQmlComponents(); @@ -1313,6 +1314,16 @@ void tst_qqmllanguage::customParserTypes() QCOMPARE(object->property("count"), QVariant(2)); } +// Tests that custom pursor types can be instantiated in ICs +void tst_qqmllanguage::customParserTypeInInlineComponent() +{ + QQmlComponent component(&engine, testFileUrl("customParserTypeInIC.qml")); + VERIFY_ERRORS(0); + QScopedPointer<QObject> object(component.create()); + QVERIFY(object != nullptr); + QCOMPARE(object->property("count"), 2); +} + // Tests that the root item can be a custom component void tst_qqmllanguage::rootAsQmlComponent() { |