First cut of using new streaming reporter interface - using an adapter to map back to the legacy interface

Doesn't do sections or the query functions (e.g. shouldRedirectStdOut)
This commit is contained in:
Phil Nash 2012-11-25 21:43:36 +00:00
parent 8baa06c63e
commit f9d92634f5
6 changed files with 115 additions and 30 deletions

View file

@ -44,12 +44,13 @@ namespace Catch {
std::vector<TestCaseFilters>::const_iterator it = filterGroups.begin();
std::vector<TestCaseFilters>::const_iterator itEnd = filterGroups.end();
LegacyReporterAdapter reporter( m_reporter );
for(; it != itEnd && !context.aborting(); ++it ) {
m_reporter->StartGroup( it->getName() );
reporter.testGroupStarting( it->getName() );
totals += runTestsForGroup( context, *it );
if( context.aborting() )
m_reporter->Aborted();
m_reporter->EndGroup( it->getName(), totals );
reporter.testGroupEnding( TestGroupStats( it->getName(), totals, context.aborting() ) );
}
return totals;
}