Reviewers: Jakob, Benedikt Meurer,

Message:
PTAL

Description:
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=Y

Please review this at https://codereview.chromium.org/724713004/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+11, -2 lines):
  M test/cctest/test-parsing.cc


Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index a36bd92763270a4b839b43d5e5a9ead34f645b7b..b6294ea1d95430acba0792eed8446bf736aa668a 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -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] = {
     { "", "" },


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to