Capture std::clog writes and combine them with std::cerr writes (#989)

This also introduces Catch::clog() method to allow embedded targets
to override std::clog usage with their own stream (presumably null-sink),
similarly to how Catch::cout() and Catch::cerr() are used.

Fixes #989
This commit is contained in:
Martin Hořeňovský
2017-08-09 15:28:40 +02:00
parent 92d714ee12
commit 7e4038d848
8 changed files with 116 additions and 7 deletions

View File

@@ -622,6 +622,9 @@ with messages:
A string sent directly to stdout
A string sent directly to stderr
Write to std::cerr
Write to std::clog
Interleaved writes to error streams
Message from section one
Message from section two
-------------------------------------------------------------------------------
@@ -953,6 +956,6 @@ with expansion:
"first" == "second"
===============================================================================
test cases: 168 | 119 passed | 45 failed | 4 failed as expected
test cases: 169 | 120 passed | 45 failed | 4 failed as expected
assertions: 968 | 859 passed | 88 failed | 21 failed as expected