Report full path of test run

This commit is contained in:
Baruch Burstein 2015-05-20 22:59:33 +03:00
parent 35f4266d00
commit 783965991a

View File

@ -18,7 +18,8 @@ namespace Catch {
StreamingReporterBase( ReporterConfig const& _config ) StreamingReporterBase( ReporterConfig const& _config )
: m_config( _config.fullConfig() ), : m_config( _config.fullConfig() ),
stream( _config.stream() ) stream( _config.stream() ),
m_sectionCount( 0 )
{} {}
virtual ~StreamingReporterBase(); virtual ~StreamingReporterBase();
@ -37,10 +38,14 @@ namespace Catch {
} }
virtual void sectionStarting( SectionInfo const& _sectionInfo ) { virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
m_sectionStack.push_back( _sectionInfo ); m_sectionStack.push_back( _sectionInfo );
m_sectionCount++;
} }
virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) { virtual void sectionEnded( SectionStats const& /* _sectionStats */ ) {
m_sectionStack.pop_back(); m_sectionCount--;
if(0 == m_sectionCount) {
m_sectionStack.clear();
}
} }
virtual void testCaseEnded( TestCaseStats const& /* _testCaseStats */ ) { virtual void testCaseEnded( TestCaseStats const& /* _testCaseStats */ ) {
currentTestCaseInfo.reset(); currentTestCaseInfo.reset();
@ -67,6 +72,7 @@ namespace Catch {
LazyStat<TestCaseInfo> currentTestCaseInfo; LazyStat<TestCaseInfo> currentTestCaseInfo;
std::vector<SectionInfo> m_sectionStack; std::vector<SectionInfo> m_sectionStack;
std::size_t m_sectionCount;
}; };
struct CumulativeReporterBase : SharedImpl<IStreamingReporter> { struct CumulativeReporterBase : SharedImpl<IStreamingReporter> {