Made ReportConfig a value type

This commit is contained in:
Phil Nash 2012-07-20 19:07:42 +01:00
parent f606517376
commit d2553cdc64
10 changed files with 156 additions and 134 deletions

View file

@ -25,13 +25,16 @@ namespace Catch {
INTERNAL_CATCH_REGISTER_REPORTER( "basic", BasicReporter )
INTERNAL_CATCH_REGISTER_REPORTER( "xml", XmlReporter )
INTERNAL_CATCH_REGISTER_REPORTER( "junit", JunitReporter )
inline int Main( Config& config ) {
std::string reporterName = config.data().reporter.empty()
? "basic"
: config.data().reporter;
Ptr<IReporter> reporter = getCurrentContext().getReporterRegistry().create( reporterName, config );
ReporterConfig reporterConfig( config.getName(), config.stream(), config.includeSuccessfulResults() );
Ptr<IReporter> reporter = getCurrentContext().getReporterRegistry().create( reporterName, reporterConfig );
if( !config.data().stream.empty() ) {
if( config.data().stream[0] == '%' )