aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 3c3a2a7a99..7da1b2c500 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -240,6 +240,7 @@ private slots:
void function();
void topLevelGeneratorFunction();
void generatorCrashNewProperty();
+ void generatorCallsGC();
void qtbug_10696();
void qtbug_11606();
void qtbug_11600();
@@ -6505,6 +6506,15 @@ void tst_qqmlecmascript::generatorCrashNewProperty()
QCOMPARE(o->property("c").toInt(), 42);
}
+void tst_qqmlecmascript::generatorCallsGC()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFileUrl("generatorCallsGC.qml"));
+
+ QScopedPointer<QObject> o(component.create()); // should not crash
+ QVERIFY2(o != nullptr, qPrintable(component.errorString()));
+}
+
// Test the "Qt.include" method
void tst_qqmlecmascript::include()
{