mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Ignore stdout in WindowsTest.LaunchMainHasNoOutput (#167583)
The stdout stream may receive expected output printed by Dart (specifically the message announcing the URL where the Dart VM service is listening) See https://github.com/flutter/flutter/issues/167418
This commit is contained in:
parent
127faefdf2
commit
cddd4acaca
@ -82,8 +82,8 @@ TEST_F(WindowsTest, LaunchMain) {
|
||||
|
||||
// Verify there is no unexpected output from launching main.
|
||||
TEST_F(WindowsTest, LaunchMainHasNoOutput) {
|
||||
// Replace stdout & stderr stream buffers with our own.
|
||||
StreamCapture stdout_capture(&std::cout);
|
||||
// Replace stderr stream buffer with our own. (stdout may contain expected
|
||||
// output printed by Dart, such as the Dart VM service startup message)
|
||||
StreamCapture stderr_capture(&std::cerr);
|
||||
|
||||
auto& context = GetContext();
|
||||
@ -91,11 +91,9 @@ TEST_F(WindowsTest, LaunchMainHasNoOutput) {
|
||||
ViewControllerPtr controller{builder.Run()};
|
||||
ASSERT_NE(controller, nullptr);
|
||||
|
||||
stdout_capture.Stop();
|
||||
stderr_capture.Stop();
|
||||
|
||||
// Verify stdout & stderr have no output.
|
||||
EXPECT_TRUE(stdout_capture.GetOutput().empty());
|
||||
// Verify stderr has no output.
|
||||
EXPECT_TRUE(stderr_capture.GetOutput().empty());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user