aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp')
-rw-r--r--tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
index 652942b243..283aef9317 100644
--- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
+++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
@@ -76,6 +76,7 @@ private slots:
void reproducibleCache();
void parameterAdjustment();
+ void inlineComponent();
};
// A wrapper around QQmlComponent to ensure the temporary reference counts
@@ -129,6 +130,7 @@ void tst_qmlcachegen::initTestCase()
if (!cacheDir.isEmpty())
//QDir(cacheDir).removeRecursively();
qDebug() << cacheDir;
+ QQmlDataTest::initTestCase();
}
void tst_qmlcachegen::loadGeneratedFile()
@@ -690,6 +692,18 @@ void tst_qmlcachegen::parameterAdjustment()
QVERIFY(!obj.isNull()); // Doesn't crash
}
+
+void tst_qmlcachegen::inlineComponent()
+{
+ bool ok = generateCache(testFile("inlineComponentWithId.qml"));
+ QVERIFY(ok);
+ QQmlEngine engine;
+ CleanlyLoadingComponent component(&engine, testFileUrl("inlineComponentWithId.qml"));
+ QTest::ignoreMessage(QtMsgType::QtInfoMsg, "42");
+ QScopedPointer<QObject> obj(component.create());
+ QVERIFY(!obj.isNull());
+}
+
QTEST_GUILESS_MAIN(tst_qmlcachegen)
#include "tst_qmlcachegen.moc"