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

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

Issue 1522693002: [es6] strict eval/arguments and strong undefined in AssignmentPattern (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
« src/parsing/parser-base.h ('K') | « src/parsing/preparser.h ('k') | no next file » | 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 bdc6dc380fed12ca8b830a54e8f5eaab69855b7b..0029669c8d83bf7a18df9252b0b3c3b09a67a912 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -7091,6 +7091,27 @@ TEST(DestructuringAssignmentNegativeTests) {
};
RunParserSyncTest(empty_context_data, ambiguity_data, kError, NULL, 0,
always_flags, arraysize(always_flags));
+
+ // Strict mode errors
+ const char* strict_context_data[][2] = {{"'use strict'; ", " = {}"},
+ {"'use strict'; for (", " of {}) {}"},
+ {"'use strict'; for (", " in {}) {}"},
+ {NULL, NULL}};
+ const char* strict_data[] = {"{ eval }",
+ "{ arguments }",
+ "{ foo: eval }",
+ "{ foo: arguments }",
+ "{ eval = 0 }",
+ "{ arguments = 0 }",
+ "{ foo: eval = 0 }",
+ "{ foo: arguments = 0 }",
+ "[ eval ]",
+ "[ arguments ]",
+ "[ eval = 0 ]",
+ "[ arguments = 0 ]",
+ NULL};
+ RunParserSyncTest(strict_context_data, strict_data, kError, NULL, 0,
+ always_flags, arraysize(always_flags));
}
« src/parsing/parser-base.h ('K') | « src/parsing/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698