Fix flags for test cases involving arrow functions
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 <aperez@igalia.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
23cf62232f
commit
5de6d47ad2
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user