Moved use of reporter into runner (our of Main, directly)

This commit is contained in:
Phil Nash
2012-07-16 08:58:28 +01:00
parent 02006d85d7
commit 8fbd8e0f9e
4 changed files with 29 additions and 26 deletions

View File

@@ -96,25 +96,27 @@ TEST_CASE( "Sections/nested3", "nested SECTION tests" )
runner.runMatching( "./Sections/nested/a/b", "mock" );
CHECK( runner.getLog() ==
"\\[tc] ./Sections/nested/a/b\n"
"\\[g] ./Sections/nested/a/b\n"
" \\[tc] ./Sections/nested/a/b\n"
" \\ [s] c\n"
" \\ [s] d (leaf)\n"
" / [s] d (leaf)\n"
" / [s] c\n"
" \\ [s] c\n"
" \\ [s] d (leaf)\n"
" / [s] d (leaf)\n"
" / [s] c\n"
" \\ [s] c\n"
" \\ [s] e (leaf)\n"
" / [s] e (leaf)\n"
" / [s] c\n"
" \\ [s] c\n"
" \\ [s] e (leaf)\n"
" / [s] e (leaf)\n"
" / [s] c\n"
" \\ [s] c\n"
" / [s] c\n"
" \\ [s] c\n"
" / [s] c\n"
" \\ [s] f (leaf)\n"
" / [s] f (leaf)\n"
" \\ [s] f (leaf)\n"
" / [s] f (leaf)\n"
"/[tc] ./Sections/nested/a/b\n" );
" /[tc] ./Sections/nested/a/b\n"
"/[g] ./Sections/nested/a/b\n" );
}

View File

@@ -27,7 +27,7 @@ namespace Catch{
// Scoped because Runner doesn't report EndTesting until its destructor
{
Runner runner( config );
Runner runner( config, config.getReporter() );
result = runner.runMatching( rawTestSpec );
m_totals = runner.getTotals();
}