Describe the bug
If I have a setup that creates a console using AllocConsole or attaches to a console with AttachConsole, the result of running with --benchmark_list_tests=true are not shown in the console because the streams are not flushed.
System
Which OS, compiler, and compiler version are you using:
OS: Windows 11 23H2, build 22631.2861
Compiler and version: Visual Studio 2022 17.8.3
To reproduce
Steps to reproduce the behavior:
In a non-console project, call AllocConsole
Create std::ostream instances for the STD_OUTPUT_HANDLE and STD_ERR_HANDLE
Create a benchmarker::ConsoleReporter
Call SetOutputStream and SetErrorStream
Run benchmarks with --benchmark_list_tests=true
Note that the benchmark list is not shown in console.
Expected behavior
The list of benchmarks should be listed in console.
Describe the bug If I have a setup that creates a console using
AllocConsole
or attaches to a console withAttachConsole
, the result of running with--benchmark_list_tests=true
are not shown in the console because the streams are not flushed.System Which OS, compiler, and compiler version are you using:
To reproduce Steps to reproduce the behavior:
--benchmark_list_tests=true
Expected behavior The list of benchmarks should be listed in console.