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

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

Issue 1656993002: [parser] report invalid rest parameter errors in Arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index bc12153729c622cf8ad031f2ae486a679949368a..e0eca42865e941ecb7c6d06ed3d86d42bc0c5fb1 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -7976,9 +7976,24 @@ TEST(EscapedKeywords) {
TEST(MiscSyntaxErrors) {
adamk 2016/02/01 23:15:59 Not sure this test makes any sense, some grouping
caitp (gmail) 2016/02/01 23:19:38 I was just getting rid of ones that weren't quite
+ // clang-format off
const char* context_data[][2] = {
- {"'use strict'", ""}, {"", ""}, {NULL, NULL}};
- const char* error_data[] = {"for (();;) {}", NULL};
+ { "'use strict'", "" },
+ { "", "" },
+ { NULL, NULL }
+ };
+
+ const char* error_data[] = {
+ "for (();;) {}",
+
+ // crbug.com/582626
+ "{ NaN ,chA((evarA=new t ( l = !.0[((... co -a0([1]))=> greturnkf",
+
+ // Simplified case:
+ "(...rest - a) => b",
adamk 2016/02/01 23:15:59 Please add a test for the multi-arg version too (t
caitp (gmail) 2016/02/01 23:19:37 Acknowledged.
+ NULL
+ };
+ // clang-format on
RunParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0);
}

Powered by Google App Engine
This is Rietveld 408576698