mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Engine] allow --enable-asserts flag to be passed to dart vm in profile mode. (flutter/engine#52029)
Allows https://github.com/flutter/flutter/issues/145729
This commit is contained in:
parent
3cd96ea83c
commit
1c2ffb9b30
@ -65,6 +65,7 @@ static const std::string kAllowedDartFlags[] = {
|
||||
"--null_assertions",
|
||||
"--strict_null_safety_checks",
|
||||
"--max_subtype_cache_entries",
|
||||
"--enable-asserts",
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
@ -123,6 +123,16 @@ TEST(SwitchesTest, NoEnableImpeller) {
|
||||
}
|
||||
}
|
||||
|
||||
#if !FLUTTER_RELEASE
|
||||
TEST(SwitchesTest, EnableAsserts) {
|
||||
fml::CommandLine command_line = fml::CommandLineFromInitializerList(
|
||||
{"command", "--dart-flags=--enable-asserts"});
|
||||
Settings settings = SettingsFromCommandLine(command_line);
|
||||
ASSERT_EQ(settings.dart_flags.size(), 1ul);
|
||||
EXPECT_EQ(settings.dart_flags[0], "--enable-asserts");
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace testing
|
||||
} // namespace flutter
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user