aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsengine/tst_qjsengine.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-01-08 19:26:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-08 19:26:48 +0100
commitff18885e0a7f7527eb96a9f2047507e7f418db45 (patch)
tree37bd1970c31447c73862b81eae4429c7366ef1c7 /tests/auto/qml/qjsengine/tst_qjsengine.cpp
parent439f31f128e70ecae16544ee7041695c60e0b2d6 (diff)
parent40722a7eaf6bb6d77d730dc3f8510718e2cad549 (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/qml/qjsengine/tst_qjsengine.cpp')
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 726f8636b6..a1662b495c 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -146,6 +146,8 @@ private slots:
void threadedEngine();
void functionDeclarationsInConditionals();
+
+ void arrayPop_QTBUG_35979();
};
tst_QJSEngine::tst_QJSEngine()
@@ -2692,6 +2694,17 @@ void tst_QJSEngine::functionDeclarationsInConditionals()
QCOMPARE(result.toBool(), true);
}
+void tst_QJSEngine::arrayPop_QTBUG_35979()
+{
+ QJSEngine eng;
+ QJSValue result = eng.evaluate(""
+ "var x = [1, 2]\n"
+ "x.pop()\n"
+ "x[1] = 3\n"
+ "x.toString()\n");
+ QCOMPARE(result.toString(), QString("1,3"));
+}
+
QTEST_MAIN(tst_QJSEngine)
#include "tst_qjsengine.moc"