Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index f27cd34e6c3c3e89f8ad7240f6cc2da547ecaf65..12e1fe907ed558ad1564bf92f081521530e9ff84 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -5564,3 +5564,21 @@ TEST(StrongForIn) { |
RunParserSyncTest(strong_context_data, data, kError, NULL, 0, always_flags, |
arraysize(always_flags)); |
} |
+ |
+ |
+TEST(ArrowFunctionASIErrors) { |
+ const char* context_data[][2] = {{"'use strict';", ""}, {"", ""}, |
+ {NULL, NULL}}; |
+ |
+ const char* data[] = { |
+ "(a\n=> a)(1)", |
+ "(a/*\n*/=> a)(1)", |
+ "((a)\n=> a)(1)", |
+ "((a)/*\n*/=> a)(1)", |
+ "((a, b)\n=> a + b)(1, 2)", |
+ "((a, b)/*\n*/=> a + b)(1, 2)", |
+ NULL}; |
+ static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions}; |
+ RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |
+ arraysize(always_flags)); |
+} |