Changed console reporter test duration reporting format

Was
"<section-name> completed in XXX s."
Now is
"XXX s: <section-name>"

Closes #322

(cherry picked from commit 0805539)
This commit is contained in:
Martin Hořeňovský 2017-02-17 14:07:56 +00:00 committed by Phil Nash
parent d8c4512b25
commit 9bab7c8229

View File

@ -67,14 +67,11 @@ namespace Catch {
stream << "\nNo assertions in test case"; stream << "\nNo assertions in test case";
stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl; stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl;
} }
if( m_headerPrinted ) { if( m_config->showDurations() == ShowDurations::Always ) {
if( m_config->showDurations() == ShowDurations::Always ) stream << _sectionStats.durationInSeconds << " s: " << _sectionStats.sectionInfo.name << std::endl;
stream << "Completed in " << _sectionStats.durationInSeconds << 's' << std::endl;
m_headerPrinted = false;
} }
else { if( m_headerPrinted ) {
if( m_config->showDurations() == ShowDurations::Always ) m_headerPrinted = false;
stream << _sectionStats.sectionInfo.name << " completed in " << _sectionStats.durationInSeconds << 's' << std::endl;
} }
StreamingReporterBase::sectionEnded( _sectionStats ); StreamingReporterBase::sectionEnded( _sectionStats );
} }