First cut of Timer class.

- started integrating with reporters (now (optionally) supported in console reporter).
- introduced Node<> template to help with cumulative reporting and used it instead of ThreadedSectionInfo.
This commit is contained in:
Phil Nash
2013-08-07 18:56:35 +01:00
parent 649f8c24b1
commit 6339254cb2
16 changed files with 379 additions and 174 deletions

View File

@@ -82,7 +82,7 @@ namespace Catch {
return true;
}
virtual void StartTesting(){}
virtual void StartTesting() {}
virtual void StartGroup( const std::string& groupName ) {
if( groupName.empty() )
@@ -189,7 +189,10 @@ namespace Catch {
xml.writeAttribute( "failures", it->m_failuresCount );
xml.writeAttribute( "tests", it->m_testsCount );
xml.writeAttribute( "hostname", "tbd" );
xml.writeAttribute( "time", "tbd" );
if( m_config.fullConfig()->showDurations() == ShowDurations::Never )
xml.writeAttribute( "time", it->m_timeInSeconds );
else
xml.writeAttribute( "time", "" );
xml.writeAttribute( "timestamp", "tbd" );
OutputTestCases( xml, *it );
@@ -207,7 +210,10 @@ namespace Catch {
XmlWriter::ScopedElement e = xml.scopedElement( "testcase" );
xml.writeAttribute( "classname", it->m_className );
xml.writeAttribute( "name", it->m_name );
xml.writeAttribute( "time", "tbd" );
if( m_config.fullConfig()->showDurations() == ShowDurations::Never )
xml.writeAttribute( "time", "" );
else
xml.writeAttribute( "time", stats.m_timeInSeconds );
OutputTestResult( xml, *it );