Support for multiple reporters

- can't (yet) specify different targets for each reporter (e.g. different files)
This commit is contained in:
Phil Nash 2015-08-05 19:02:17 +01:00
parent c06e1909ae
commit 4cb74761d9
11 changed files with 205 additions and 19 deletions

View file

@ -23,6 +23,7 @@ namespace Catch {
config.abortAfter = x;
}
inline void addTestOrTags( ConfigData& config, std::string const& _testSpec ) { config.testsOrTags.push_back( _testSpec ); }
inline void addReporterName( ConfigData& config, std::string const& _reporterName ) { config.reporterNames.push_back( _reporterName ); }
inline void addWarning( ConfigData& config, std::string const& _warning ) {
if( _warning == "NoAssertions" )
@ -116,7 +117,7 @@ namespace Catch {
cli["-r"]["--reporter"]
// .placeholder( "name[:filename]" )
.describe( "reporter to use (defaults to console)" )
.bind( &ConfigData::reporterName, "name" );
.bind( &addReporterName, "name" );
cli["-n"]["--name"]
.describe( "suite name" )