From f41fad7e20108ffe1b8c9eadbff1838ccdc9fe82 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Fri, 16 Aug 2013 18:57:41 +0100 Subject: [PATCH] Don't report durations if not reporter anything else --- include/reporters/catch_reporter_console.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/reporters/catch_reporter_console.hpp b/include/reporters/catch_reporter_console.hpp index 8b84c8db..8dd8d902 100644 --- a/include/reporters/catch_reporter_console.hpp +++ b/include/reporters/catch_reporter_console.hpp @@ -67,9 +67,11 @@ namespace Catch { stream << "\nNo assertions in test case"; stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl; } - m_headerPrinted = false; - if( m_config->showDurations() == ShowDurations::Always ) - stream << "Completed in " << _sectionStats.durationInSeconds << "s" << std::endl; + if( m_headerPrinted ) { + if( m_config->showDurations() == ShowDurations::Always ) + stream << "Completed in " << _sectionStats.durationInSeconds << "s" << std::endl; + m_headerPrinted = false; + } StreamingReporterBase::sectionEnded( _sectionStats ); }