diff options
Diffstat (limited to 'tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp')
-rw-r--r-- | tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp index b20af06746..a7b02f3cca 100644 --- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp +++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp @@ -46,6 +46,8 @@ private slots: void signalHandlerParameters(); void errorOnArgumentsInSignalHandler(); void aheadOfTimeCompilation(); + + void workerScripts(); }; // A wrapper around QQmlComponent to ensure the temporary reference counts @@ -259,6 +261,19 @@ void tst_qmlcachegen::aheadOfTimeCompilation() QCOMPARE(result.toInt(), 42); } +void tst_qmlcachegen::workerScripts() +{ + QVERIFY(QFile::exists(":/workerscripts/worker.js")); + QVERIFY(QFile::exists(":/workerscripts/worker.qml")); + QCOMPARE(QFileInfo(":/workerscripts/worker.js").size(), 0); + + QQmlEngine engine; + CleanlyLoadingComponent component(&engine, QUrl("qrc:///workerscripts/worker.qml")); + QScopedPointer<QObject> obj(component.create()); + QVERIFY(!obj.isNull()); + QTRY_VERIFY(obj->property("success").toBool()); +} + QTEST_GUILESS_MAIN(tst_qmlcachegen) #include "tst_qmlcachegen.moc" |