aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsengine
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-06-13 17:44:44 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-06-13 18:47:43 +0200
commitcb8273289848fd1d8ddf9d37327e5211d959595a (patch)
treedc1554a41c4a0a480a54031bcedb0d51c245e43a /tests/auto/qml/qjsengine
parent6a4c4ae639abf565d5cdc56a29f51e474abbfaef (diff)
Fix test case
The for..in statements behavior is actually undefined when it comes to inserting values into the object being iterated over. Simply adjust the test case to the v4 behavior. Change-Id: I85774ae98810d8c14ee457138ccc54082de47802 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml/qjsengine')
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index c9f6fc41f7..30a113f535 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -1835,7 +1835,7 @@ void tst_QJSEngine::jsForInStatement_mutateWhileIterating()
QJSValue ret = eng.evaluate("o = { p: 123 }; r = [];"
"for (var p in o) { r[r.length] = p; o.q = 456; } r");
QStringList lst = qjsvalue_cast<QStringList>(ret);
- QCOMPARE(lst.size(), 1);
+ QCOMPARE(lst.size(), 2);
QCOMPARE(lst.at(0), QString::fromLatin1("p"));
}