Resolve reporter outside of Config

config now only only holds reporter name
This commit is contained in:
Phil Nash 2012-07-17 08:04:19 +01:00
parent 8fbd8e0f9e
commit 5d73c5a008
7 changed files with 80 additions and 85 deletions

View file

@ -20,14 +20,11 @@ namespace Catch{
Config config;
config.setStreamBuf( oss.rdbuf() );
//if( reporter == "mock" ) // !TBD
config.setReporter( m_reporter.get() );
std::size_t result;
// Scoped because Runner doesn't report EndTesting until its destructor
{
Runner runner( config, config.getReporter() );
Runner runner( config, m_reporter.get() );
result = runner.runMatching( rawTestSpec );
m_totals = runner.getTotals();
}