Quick fix for nested sections - doesn't cover all cases yet

This commit is contained in:
Phil Nash 2011-02-17 19:40:46 +00:00
parent ab30ab6b76
commit a8c31c725d
1 changed files with 13 additions and 2 deletions

View File

@ -107,9 +107,19 @@ namespace Catch
{
if( m_sectionsSeen.find( name ) != m_sectionsSeen.end() )
return false;
m_sectionsSeen.insert( name );
return m_sectionSeen = true;
return true;
}
///////////////////////////////////////////////////////////////////////
void endSection
(
const std::string& name
)
{
m_sectionsSeen.insert( name );
m_sectionSeen = true;
}
///////////////////////////////////////////////////////////////////////
const TestCaseInfo& getTestCaseInfo
()
@ -382,6 +392,7 @@ namespace Catch
std::size_t prevFailures
)
{
m_runningTest.endSection( name );
m_reporter->EndSection( name, m_successes - prevSuccesses, m_failures - prevFailures );
}