Commit b6c9a62c authored by arv's avatar arv Committed by Commit bot

Reduce ErrorsFutureStrictReservedWords test to make it faster

Since checking all possible combinations is taking so long this
reduces the test to test the odd cases (let, yield and static) as
well as a single ordinary case.

BUG=v8:3707
LOG=n

Review URL: https://codereview.chromium.org/724713004

Cr-Commit-Position: refs/heads/master@{#25428}
parent 40d4674d
......@@ -1840,6 +1840,13 @@ TEST(NoErrorsEvalAndArgumentsStrict) {
V(yield)
#define LIMITED_FUTURE_STRICT_RESERVED_WORDS(V) \
V(implements) \
V(let) \
V(static) \
V(yield)
#define FUTURE_STRICT_RESERVED_STATEMENTS(NAME) \
"var " #NAME ";", \
"var foo, " #NAME ";", \
......@@ -1861,14 +1868,13 @@ TEST(ErrorsFutureStrictReservedWords) {
// it's ok to use future strict reserved words as identifiers. With the strict
// mode, it isn't.
const char* context_data[][2] = {
{ "\"use strict\";", "" },
{ "function test_func() {\"use strict\"; ", "}"},
{ "() => { \"use strict\"; ", "}" },
{ NULL, NULL }
};
const char* statement_data[] {
FUTURE_STRICT_RESERVED_WORDS(FUTURE_STRICT_RESERVED_STATEMENTS)
LIMITED_FUTURE_STRICT_RESERVED_WORDS(FUTURE_STRICT_RESERVED_STATEMENTS)
NULL
};
......@@ -1883,6 +1889,9 @@ TEST(ErrorsFutureStrictReservedWords) {
}
#undef LIMITED_FUTURE_STRICT_RESERVED_WORDS
TEST(NoErrorsFutureStrictReservedWords) {
const char* context_data[][2] = {
{ "", "" },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment