diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-07-02 16:43:59 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-02 20:57:15 +0200 |
commit | 2ba188dce0d04a7f53ba5ef89f1fcf16cfcdde42 (patch) | |
tree | 2122094f9561ccee7c25f5bc0607cc9d5c37ed0b /tests/auto | |
parent | d7134b8b68f0b3530269f7d087bdecfc8986be6b (diff) |
Fix automatic semicolon insertion. Again.
After a do-token, no automatic semicolon can be inserted, because that
would result in an empty statement. The issue was that the correct state
was set when a do-token was found, but the state updating logic would
immediately reset it back, resulting in a semicolon insertion.
Change-Id: If867510dfaa182d0fe8b73a5bb1cab299c4faecc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 7c9f5b106c..fe467b5ac0 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -1541,16 +1541,12 @@ void tst_QJSEngine::automaticSemicolonInsertion() } { QJSValue ret = eng.evaluate("n = 5; i = 0; do\n ++n; while (++i < 10); n"); - QEXPECT_FAIL("", "Known issue with automatic semicolon insertion. Regression from V8", Continue); QVERIFY(ret.isNumber()); - QEXPECT_FAIL("", "Known issue with automatic semicolon insertion. Regression from V8", Continue); QCOMPARE(ret.toInt(), 15); } { QJSValue ret = eng.evaluate("n = 20; i = 0; do\n --n; while (++i < 10); n"); - QEXPECT_FAIL("", "Known issue with automatic semicolon insertion. Regression from V8", Continue); QVERIFY(ret.isNumber()); - QEXPECT_FAIL("", "Known issue with automatic semicolon insertion. Regression from V8", Continue); QCOMPARE(ret.toInt(), 10); } |