Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index b6c427fff9e20189b1a2debbeaf007ea47fb8946..1a17475adad318894c84287b9553db1bc39e8679 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -5548,3 +5548,25 @@ TEST(StrongEmptySubStatements) { |
RunParserSyncTest(strong_context_data, data, kError, NULL, 0, always_flags, |
arraysize(always_flags)); |
} |
+ |
+ |
+TEST(StrongForIn) { |
+ const char* sloppy_context_data[][2] = {{"", ""}, {NULL}}; |
+ const char* strict_context_data[][2] = {{"'use strict';", ""}, {NULL}}; |
+ const char* strong_context_data[][2] = {{"'use strong';", ""}, {NULL}}; |
+ |
+ const char* data[] = { |
+ "for (x in []) {}", |
+ "for (const x in []) {}", |
+ NULL}; |
+ |
+ static const ParserFlag always_flags[] = { |
+ kAllowStrongMode, kAllowHarmonyScoping |
+ }; |
+ RunParserSyncTest(sloppy_context_data, data, kSuccess, NULL, 0, always_flags, |
+ arraysize(always_flags)); |
+ RunParserSyncTest(strict_context_data, data, kSuccess, NULL, 0, always_flags, |
+ arraysize(always_flags)); |
+ RunParserSyncTest(strong_context_data, data, kError, NULL, 0, always_flags, |
+ arraysize(always_flags)); |
+} |