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.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 9198d3bebf..3c3a2a7a99 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -239,6 +239,7 @@ private slots:
void eval();
void function();
void topLevelGeneratorFunction();
+ void generatorCrashNewProperty();
void qtbug_10696();
void qtbug_11606();
void qtbug_11600();
@@ -6489,6 +6490,21 @@ void tst_qqmlecmascript::topLevelGeneratorFunction()
QCOMPARE(it.property("next").callWithInstance(it).property("value").toInt(), 1);
}
+// QTBUG-91491
+void tst_qqmlecmascript::generatorCrashNewProperty()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFileUrl("generatorCrashNewProperty.qml"));
+
+ QScopedPointer<QObject> o(component.create());
+
+ QVERIFY2(o != nullptr, qPrintable(component.errorString()));
+
+ QCOMPARE(o->property("a").toInt(), 42);
+ QCOMPARE(o->property("b").toInt(), 12);
+ QCOMPARE(o->property("c").toInt(), 42);
+}
+
// Test the "Qt.include" method
void tst_qqmlecmascript::include()
{