aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2017-04-27 14:01:43 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2017-04-27 14:01:43 +0000
commitb7a7ed7c31db1557b0d67a0d39f9261be6a5d51b (patch)
tree67e77fee8343b8456a07d7158aaebd1441b10d59 /tests
parent0757777f196647e04c6813f0347179437fdc4812 (diff)
parentc9728926a878a0e2301ee9d2bfb0ab23862d810b (diff)
Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/qtbug_59012.qml14
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp9
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/qtbug_59012.qml b/tests/auto/qml/qqmlecmascript/data/qtbug_59012.qml
new file mode 100644
index 0000000000..5283614435
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/qtbug_59012.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+
+QtObject {
+ Component.onCompleted: {
+ var pieces = [[4,21],[6,22],[8,23],[12,24],[10,25],[8,26],[6,27],[4,28],[2,31],[2,32],[2,33],[2,35],[2,36],[2,37],[2,38],[2,54]]
+ var i = pieces.length;
+ var king = 10
+ var val
+ do {
+ var p = pieces[--i];
+ val = p[0]
+ } while (val !== king);
+ }
+}
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index b5df8307c0..72179d243f 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -336,6 +336,7 @@ private slots:
void instanceof_data();
void instanceof();
void freeze_empty_object();
+ void singleBlockLoops();
private:
// static void propertyVarWeakRefCallback(v8::Persistent<v8::Value> object, void* parameter);
@@ -8240,6 +8241,14 @@ void tst_qqmlecmascript::freeze_empty_object()
QCOMPARE(v.toBool(), true);
}
+void tst_qqmlecmascript::singleBlockLoops()
+{
+ QQmlComponent component(&engine, testFileUrl("qtbug_59012.qml"));
+
+ QScopedPointer<QObject> obj(component.create());
+ QVERIFY(obj != 0);
+ QVERIFY(!component.isError());
+}
QTEST_MAIN(tst_qqmlecmascript)