acutest icon indicating copy to clipboard operation
acutest copied to clipboard

flush stdout and stderr before aborting

Open rittneje opened this issue 4 years ago • 0 comments

When using TEST_ASSERT and TEST_ASSERT_, it seems the program exits before stdout and stderr are flushed, meaning the corresponding messages don't show up in the output.

Please add the following to acutest_abort_ before actually aborting.

fflush(stdout);
fflush(stderr);

https://github.com/mity/acutest/blob/1849c0245504f2cd08fd78093bc3ebcbe7595a77/include/acutest.h#L870-L880

rittneje avatar Jun 24 '21 00:06 rittneje