mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-01 01:18:02 +00:00
Only use std::cout/ cert via Catch::cout/ cert - and make those conditional on CATCH_CONFIG_NOSTDOUT
This commit is contained in:
parent
85b4e94192
commit
383d7c06a1
15 changed files with 109 additions and 83 deletions
|
@ -81,12 +81,12 @@ namespace Catch {
|
|||
public:
|
||||
|
||||
Config()
|
||||
: m_os( std::cout.rdbuf() )
|
||||
: m_os( Catch::cout().rdbuf() )
|
||||
{}
|
||||
|
||||
Config( ConfigData const& data )
|
||||
: m_data( data ),
|
||||
m_os( std::cout.rdbuf() )
|
||||
m_os( Catch::cout().rdbuf() )
|
||||
{
|
||||
if( !data.testsOrTags.empty() ) {
|
||||
TestSpecParser parser( ITagAliasRegistry::get() );
|
||||
|
@ -97,7 +97,7 @@ namespace Catch {
|
|||
}
|
||||
|
||||
virtual ~Config() {
|
||||
m_os.rdbuf( std::cout.rdbuf() );
|
||||
m_os.rdbuf( Catch::cout().rdbuf() );
|
||||
m_stream.release();
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ namespace Catch {
|
|||
bool shouldDebugBreak() const { return m_data.shouldDebugBreak; }
|
||||
|
||||
void setStreamBuf( std::streambuf* buf ) {
|
||||
m_os.rdbuf( buf ? buf : std::cout.rdbuf() );
|
||||
m_os.rdbuf( buf ? buf : Catch::cout().rdbuf() );
|
||||
}
|
||||
|
||||
void useStream( std::string const& streamName ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue