Used Counts class in IResultCapture interface

This commit is contained in:
Phil Nash 2012-02-23 08:57:51 +00:00
parent 5ddf794fbc
commit 8d93949b19
3 changed files with 12 additions and 18 deletions

View file

@ -480,8 +480,7 @@ namespace Catch
const std::string& description,
const std::string& filename,
std::size_t line,
std::size_t& successes,
std::size_t& failures
Counts& assertions
)
{
std::ostringstream oss;
@ -492,8 +491,7 @@ namespace Catch
m_currentResult.setFileAndLine( filename, line );
m_reporter->StartSection( name, description );
successes = m_totals.assertions.passed;
failures = m_totals.assertions.failed;
assertions = m_totals.assertions;
return true;
}
@ -501,13 +499,12 @@ namespace Catch
///////////////////////////////////////////////////////////////////////////
virtual void sectionEnded
(
const std::string& name,
std::size_t prevSuccesses,
std::size_t prevFailures
const std::string& name,
const Counts& prevAssertions
)
{
m_runningTest->endSection( name );
m_reporter->EndSection( name, m_totals.assertions.passed - prevSuccesses, m_totals.assertions.failed - prevFailures );
m_reporter->EndSection( name, m_totals.assertions.passed - prevAssertions.passed, m_totals.assertions.failed - prevAssertions.failed );
}
///////////////////////////////////////////////////////////////////////////