From bd5910ef9f758616111ba25df95ffd1c07673f5a Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Wed, 17 Apr 2013 00:05:25 +0100 Subject: [PATCH] Moved line info in header again --- include/reporters/catch_reporter_console.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/reporters/catch_reporter_console.hpp b/include/reporters/catch_reporter_console.hpp index 9cd25e89..741f00b5 100644 --- a/include/reporters/catch_reporter_console.hpp +++ b/include/reporters/catch_reporter_console.hpp @@ -284,6 +284,15 @@ namespace Catch { } } + SourceLineInfo lineInfo = currentSectionInfo + ? currentSectionInfo->lineInfo + : unusedTestCaseInfo->lineInfo; + + if( !lineInfo.empty() ){ + stream << getDashes() << "\n"; + Colour colourGuard( Colour::FileName ); + stream << lineInfo << "\n"; + } stream << getDots() << "\n" << std::endl; } @@ -293,10 +302,6 @@ namespace Catch { } void printOpenHeader( std::string const& _name, SourceLineInfo const& _lineInfo = SourceLineInfo() ) { stream << getDashes() << "\n"; - if( !_lineInfo.empty() ){ - Colour colourGuard( Colour::FileName ); - stream << _lineInfo << "\n\n"; - } { Colour colourGuard( Colour::Headers ); printUserString( _name );