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

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

Issue 2650863002: [parser] Throw error when there are too many excluded properties (Closed)
Patch Set: fmt Created 3 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
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.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 b3b8822aaeecebefc2bf7c11f377610a0d19b33a..abde94e21c172c0effd1e1ac6fe495072ecabe9d 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -6971,6 +6971,33 @@ TEST(DestructuringNegativeTests) {
RunParserSyncTest(context_data, rest_data, kError, NULL, 0, flags,
arraysize(flags));
}
+
+ {
+ // clang-format off
+ const char* context_data[][2] = {
+ {"var { ", " } = { a: 1};"},
+ { NULL, NULL }
+ };
+
+ using v8::internal::Code;
+ std::string statement;
+ for (int i = 0; i < Code::kMaxArguments; ++i) {
+ statement += std::to_string(i) + " : " + "x, ";
+ }
+ statement += "...y";
+
+ const char* statement_data[] = {
+ statement.c_str(),
+ NULL
+ };
+
+ // clang-format on
+ // The test is quite slow, so run it with a reduced set of flags.
adamk 2017/01/23 21:47:45 How slow did this end up being? Depending on your
gsathya 2017/01/23 22:22:27 This doubled the run time of the test (13s to 25s)
+ static const ParserFlag flags[] = {kAllowLazy,
+ kAllowHarmonyObjectRestSpread};
+ RunParserSyncTest(context_data, statement_data, kError, NULL, 0, flags,
+ arraysize(flags));
+ }
}
« src/parsing/parser-base.h ('K') | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698