mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-20 19:45:40 +02:00
Fixed alternate stream bugs
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Catch {
|
||||
: m_configWrapper( configWrapper ),
|
||||
m_config( configWrapper.data() )
|
||||
{
|
||||
resolveStream();
|
||||
openStream();
|
||||
makeReporter();
|
||||
}
|
||||
|
||||
@@ -78,13 +78,10 @@ namespace Catch {
|
||||
}
|
||||
|
||||
private:
|
||||
void resolveStream() {
|
||||
if( !m_config.stream.empty() ) {
|
||||
if( m_config.stream[0] == '%' )
|
||||
m_configWrapper.useStream( m_config.stream.substr( 1 ) );
|
||||
else
|
||||
m_configWrapper.setFilename( m_config.stream );
|
||||
}
|
||||
void openStream() {
|
||||
if( !m_config.stream.empty() )
|
||||
m_configWrapper.useStream( m_config.stream );
|
||||
|
||||
// Open output file, if specified
|
||||
if( !m_config.outputFilename.empty() ) {
|
||||
m_ofs.open( m_config.outputFilename.c_str() );
|
||||
|
Reference in New Issue
Block a user