Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 447a6e6

Browse files
lewissbakerLewis Baker
authored andcommitted
Force doctest to flush each message to stdout.
This should avoid missing messages due to buffering should the process crash soon after a message was written.
1 parent 02d1822 commit 447a6e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/doctest/doctest.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5036,6 +5036,8 @@ namespace doctest
50365036
DOCTEST_PRINTF_COLORED(context.c_str(), Color::None);
50375037
DOCTEST_PRINTF_COLORED("\n", Color::None);
50385038

5039+
std::fflush(stdout);
5040+
50395041
printToDebugConsole(String(loc) + msg + " " + info.c_str() + "\n" + context.c_str() +
50405042
"\n");
50415043

0 commit comments

Comments
 (0)