aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp')
-rw-r--r--tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
index 36c13bb705..c4a1a6aea4 100644
--- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
+++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
@@ -125,6 +125,7 @@ private slots:
void testRequiredProperties();
void testRequiredPropertiesFromQml();
void testSetInitialProperties();
+ void createInsideJSModule();
private:
QQmlEngine engine;
@@ -832,6 +833,15 @@ void tst_qqmlcomponent::testSetInitialProperties()
}
}
+void tst_qqmlcomponent::createInsideJSModule()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFileUrl("jsmodule/test.qml"));
+ QScopedPointer<QObject> root(component.create());
+ QVERIFY2(root, qPrintable(component.errorString()));
+ QVERIFY(root->property("ok").toBool());
+}
+
QTEST_MAIN(tst_qqmlcomponent)
#include "tst_qqmlcomponent.moc"