Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index 9431a4d28eca974867cd534650c626cd9ca46ca2..d0aa54815ca5d6f9794e9b2a562376c7615385c5 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -1500,7 +1500,6 @@ i::Handle<i::String> FormatMessage(i::Vector<unsigned> data) { |
return i::MessageTemplate::FormatMessage(isolate, message, arg_object); |
} |
- |
enum ParserFlag { |
kAllowLazy, |
kAllowNatives, |
@@ -1511,10 +1510,10 @@ enum ParserFlag { |
kAllowHarmonyDestructuringAssignment, |
kAllowHarmonyNewTarget, |
kAllowStrongMode, |
- kNoLegacyConst |
+ kNoLegacyConst, |
+ kAllowHarmonyFunctionSent |
}; |
- |
enum ParserSyncTestResult { |
kSuccessOrError, |
kSuccess, |
@@ -1536,6 +1535,8 @@ void SetParserFlags(i::ParserBase<Traits>* parser, |
flags.Contains(kAllowHarmonyDestructuringAssignment)); |
parser->set_allow_strong_mode(flags.Contains(kAllowStrongMode)); |
parser->set_allow_legacy_const(!flags.Contains(kNoLegacyConst)); |
+ parser->set_allow_harmony_function_sent( |
+ flags.Contains(kAllowHarmonyFunctionSent)); |
} |
@@ -8022,10 +8023,9 @@ TEST(FunctionSentErrors) { |
}; |
// clang-format on |
- bool old_flag = i::FLAG_harmony_function_sent; |
- i::FLAG_harmony_function_sent = true; |
- RunParserSyncTest(context_data, error_data, kError); |
- i::FLAG_harmony_function_sent = old_flag; |
+ static const ParserFlag always_flags[] = {kAllowHarmonyFunctionSent}; |
+ RunParserSyncTest(context_data, error_data, kError, always_flags, |
+ arraysize(always_flags)); |
} |
TEST(NewTargetErrors) { |