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

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

Issue 2650863002: [parser] Throw error when there are too many excluded properties (Closed)
Patch Set: skip test in debug 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
« no previous file with comments | « test/cctest/cctest.status ('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..8bb4b5b7d1b2cc0600b139339398be9420fdf6dc 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -6973,6 +6973,31 @@ TEST(DestructuringNegativeTests) {
}
}
+TEST(ObjectRestNegativeTestSlow) {
+ // 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.
+ static const ParserFlag flags[] = {kAllowLazy, kAllowHarmonyObjectRestSpread};
+ RunParserSyncTest(context_data, statement_data, kError, NULL, 0, flags,
+ arraysize(flags));
+}
TEST(DestructuringAssignmentPositiveTests) {
const char* context_data[][2] = {
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698