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

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

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments. Created 9 years, 1 month 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 | « test/mjsunit/harmony/block-conflicts.js ('k') | test/mjsunit/harmony/block-leave.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/block-for.js
diff --git a/test/mjsunit/harmony/block-for.js b/test/mjsunit/harmony/block-for.js
index 1f68037a25778ea4dad417c3586a1d3404431f71..e84f0d2fee852ce05c0e797d59b98b8dbd0c3260 100644
--- a/test/mjsunit/harmony/block-for.js
+++ b/test/mjsunit/harmony/block-for.js
@@ -27,6 +27,9 @@
// Flags: --harmony-scoping
+// TODO(ES6): properly activate extended mode
+"use strict";
+
function props(x) {
var array = [];
for (let p in x) array.push(p);
@@ -90,12 +93,13 @@ assertEquals('ab', result);
// Check that there is exactly one variable without initializer
// in a for-in statement with let variables.
-assertThrows("function foo() { for (let in {}) { } }", SyntaxError);
-assertThrows("function foo() { for (let x = 3 in {}) { } }", SyntaxError);
-assertThrows("function foo() { for (let x, y in {}) { } }", SyntaxError);
-assertThrows("function foo() { for (let x = 3, y in {}) { } }", SyntaxError);
-assertThrows("function foo() { for (let x, y = 4 in {}) { } }", SyntaxError);
-assertThrows("function foo() { for (let x = 3, y = 4 in {}) { } }", SyntaxError);
+// TODO(ES6): properly activate extended mode
+assertThrows("function foo() { 'use strict'; for (let in {}) { } }", SyntaxError);
+assertThrows("function foo() { 'use strict'; for (let x = 3 in {}) { } }", SyntaxError);
+assertThrows("function foo() { 'use strict'; for (let x, y in {}) { } }", SyntaxError);
+assertThrows("function foo() { 'use strict'; for (let x = 3, y in {}) { } }", SyntaxError);
+assertThrows("function foo() { 'use strict'; for (let x, y = 4 in {}) { } }", SyntaxError);
+assertThrows("function foo() { 'use strict'; for (let x = 3, y = 4 in {}) { } }", SyntaxError);
// In a normal for statement the iteration variable is not
« no previous file with comments | « test/mjsunit/harmony/block-conflicts.js ('k') | test/mjsunit/harmony/block-leave.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698