From 2ba188dce0d04a7f53ba5ef89f1fcf16cfcdde42 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 2 Jul 2013 16:43:59 +0200 Subject: 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 --- tests/auto/qml/qjsengine/tst_qjsengine.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'tests/auto/qml/qjsengine') 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); } -- cgit v1.2.3