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

Unified Diff: test/cctest/test-parsing.cc

Issue 1511773009: Revert of [es6] support AssignmentPattern as LHS in for-in/of loops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « src/parsing/preparser.cc ('k') | test/mjsunit/harmony/destructuring-assignment.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index af999448eb29f3ac78f060ccda4a392d69279e8c..942c5be02a6724efe810f52b05dc4c83b2331579 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -6828,25 +6828,6 @@
{"'use strict'; let x, y, z; for (x of ", " = {});"},
{"var x, y, z; for (x in ", " = {});"},
{"var x, y, z; for (x of ", " = {});"},
- {"var x, y, z; for (", " in {});"},
- {"var x, y, z; for (", " of {});"},
- {"'use strict'; var x, y, z; for (", " in {});"},
- {"'use strict'; var x, y, z; for (", " of {});"},
- {NULL, NULL}};
-
- const char* mixed_assignments_context_data[][2] = {
- {"'use strict'; let x, y, z; (", " = z = {});"},
- {"var x, y, z; (", " = z = {});"},
- {"'use strict'; let x, y, z; (x = ", " = z = {});"},
- {"var x, y, z; (x = ", " = z = {});"},
- {"'use strict'; let x, y, z; for (x in ", " = z = {});"},
- {"'use strict'; let x, y, z; for (x in x = ", " = z = {});"},
- {"'use strict'; let x, y, z; for (x of ", " = z = {});"},
- {"'use strict'; let x, y, z; for (x of x = ", " = z = {});"},
- {"var x, y, z; for (x in ", " = z = {});"},
- {"var x, y, z; for (x in x = ", " = z = {});"},
- {"var x, y, z; for (x of ", " = z = {});"},
- {"var x, y, z; for (x of x = ", " = z = {});"},
{NULL, NULL}};
// clang-format off
@@ -6920,6 +6901,8 @@
"[ [ foo()[x] = 10 ] = {} ]",
"[ [ x.y = 10 ] = {} ]",
"[ [ x[y] = 10 ] = {} ]",
+
+ "{ x : y }",
"{ x : y = 1 }",
"{ x }",
"{ x, y, z }",
@@ -6962,8 +6945,12 @@
"[...x]",
"[x,y,...z]",
"[x,,...z]",
- "{ x: y }",
- "[x, y]",
+ "{ x: y } = z",
+ "[x, y] = z",
+ "{ x: y } = { z }",
+ "[x, y] = { z }",
+ "{ x: y } = [ z ]",
+ "[x, y] = [ z ]",
"[((x, y) => z).x]",
"{x: ((y, z) => z).x}",
"[((x, y) => z)['x']]",
@@ -6978,9 +6965,6 @@
kAllowHarmonyDefaultParameters};
RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
arraysize(always_flags));
-
- RunParserSyncTest(mixed_assignments_context_data, data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
const char* empty_context_data[][2] = {
{"'use strict';", ""}, {"", ""}, {NULL, NULL}};
« no previous file with comments | « src/parsing/preparser.cc ('k') | test/mjsunit/harmony/destructuring-assignment.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698