From 5de6d47ad2ad88d1831254d73c104801252f4d48 Mon Sep 17 00:00:00 2001 From: "marja@chromium.org" Date: Tue, 15 Jul 2014 08:10:26 +0000 Subject: [PATCH] Fix flags for test cases involving arrow functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There are a lot of tests in cctest/test-parsing/ErrorsArrowFunctions, so it is quite slow. This patch removes some flags to make it faster. Removing three flags that don't affect the test brings down the run time one order of magnitude, which is fast enough even for debug/ASAN bots. Also, remove the unneeded kArrowFunctions flag from cctest/test-parsing/NoErrorsYieldSloppyAllModes BUG= R=marja@chromium.org Review URL: https://codereview.chromium.org/387383002 Patch from Adrián Pérez de Castro . git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- test/cctest/test-parsing.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc index e21eabd..bf5362c 100644 --- a/test/cctest/test-parsing.cc +++ b/test/cctest/test-parsing.cc @@ -1815,9 +1815,7 @@ TEST(NoErrorsYieldSloppyAllModes) { NULL }; - static const ParserFlag always_flags[] = {kAllowArrowFunctions}; - RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0, - always_flags, ARRAY_SIZE(always_flags)); + RunParserSyncTest(context_data, statement_data, kSuccess); } @@ -3088,7 +3086,13 @@ TEST(ErrorsArrowFunctions) { NULL }; - RunParserSyncTest(context_data, statement_data, kError); + // The test is quite slow, so run it with a reduced set of flags. + static const ParserFlag flags[] = { + kAllowLazy, kAllowHarmonyScoping, kAllowGenerators + }; + static const ParserFlag always_flags[] = { kAllowArrowFunctions }; + RunParserSyncTest(context_data, statement_data, kError, flags, + ARRAY_SIZE(flags), always_flags, ARRAY_SIZE(always_flags)); } -- 2.7.4