aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp')
-rw-r--r--tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
index 266a4e97d6..1303a4b19c 100644
--- a/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
+++ b/tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
@@ -63,6 +63,7 @@ private slots:
void implicitImport();
void compositeSingletonCycle();
void declarativeCppType();
+ void circularDependency();
};
void tst_QQMLTypeLoader::testLoadComplete()
@@ -592,6 +593,14 @@ void tst_QQMLTypeLoader::declarativeCppType()
QVERIFY(!obj.isNull());
}
+void tst_QQMLTypeLoader::circularDependency()
+{
+ QQmlEngine engine;
+ QTest::ignoreMessage(QtWarningMsg, QRegularExpression("Cyclic dependency detected between (.*) and (.*)"));
+ QQmlComponent component(&engine, testFileUrl("CircularDependency.qml"));
+ QCOMPARE(component.status(), QQmlComponent::Null);
+}
+
QTEST_MAIN(tst_QQMLTypeLoader)
#include "tst_qqmltypeloader.moc"