Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Unified Diff: test/mjsunit/es6/block-for.js

Issue 1415283003: Adapt tests in preparation of shipping --harmony-completion. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/harmony/do-expressions.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/block-for.js
diff --git a/test/mjsunit/es6/block-for.js b/test/mjsunit/es6/block-for.js
index a54d43490e2f18cdb23141f12f73315ef5f8c49a..c7a23e8d32f18ec6b39693482bfe5935ec3af36a 100644
--- a/test/mjsunit/es6/block-for.js
+++ b/test/mjsunit/es6/block-for.js
@@ -24,6 +24,9 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Flags: --harmony-completion
+
"use strict";
function props(x) {
@@ -189,10 +192,18 @@ assertEquals(undefined, eval("for (let i = 0; i < 10; i++) { continue; i; }"));
assertEquals(0, eval("for (let i = 0; true;) { i; break; }"));
assertEquals(0, eval("for (const i = 0; true;) { i; break; }"));
assertEquals(9, eval("for (let i = 0; i < 10; i++) { i; continue; }"));
-assertEquals(3, eval("for (let i = 0; true; i++) { i; if (i >= 3) break; }")); // --harmony-completion: undefined
-assertEquals(2, eval("for (let i = 0; true; i++) { if (i >= 3) break; i; }")); // --harmony-completion: undefined
-assertEquals(
- 2, eval("for (let i = 0; i < 10; i++) { if (i >= 3) continue; i; }")); // --harmony-completion: undefined
+assertEquals(undefined,
+ eval("for (let i = 0; true; i++) { i; if (i >= 3) break; }"));
+assertEquals(3,
+ eval("for (let i = 0; true; i++) { i; if (i >= 3) { i; break; } }"));
+assertEquals(undefined,
+ eval("for (let i = 0; true; i++) { if (i >= 3) break; i; }"));
+assertEquals(3,
+ eval("for (let i = 0; true; i++) { if (i >= 3) { i; break; }; i; }"));
+assertEquals(undefined,
+ eval("for (let i = 0; i < 10; i++) { if (i >= 3) continue; i; }"));
+assertEquals(9,
+ eval("for (let i = 0; i < 10; i++) { if (i >= 3) {i; continue; }; i; }"));
assertEquals(undefined, eval("foo: for (let i = 0; true;) { break foo; }"));
assertEquals(undefined, eval("foo: for (const i = 0; true;) { break foo; }"));
assertEquals(3, eval("foo: for (let i = 3; true;) { i; break foo; }"));
« no previous file with comments | « no previous file | test/mjsunit/harmony/do-expressions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698