From 84e8b696b119647df0d5483cdbad9eff6d446cb8 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Wed, 6 Dec 2017 14:30:17 +0000 Subject: [PATCH] Include Info messages in xml reporter even without -s --- include/reporters/catch_reporter_xml.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/reporters/catch_reporter_xml.hpp b/include/reporters/catch_reporter_xml.hpp index 55c19564..2df9d329 100644 --- a/include/reporters/catch_reporter_xml.hpp +++ b/include/reporters/catch_reporter_xml.hpp @@ -97,12 +97,12 @@ namespace Catch { bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); - if( includeResults ) { + if( includeResults || result.getResultType() == ResultWas::Warning ) { // Print any info messages in tags. for( std::vector::const_iterator it = assertionStats.infoMessages.begin(), itEnd = assertionStats.infoMessages.end(); it != itEnd; ++it ) { - if( it->type == ResultWas::Info ) { + if( it->type == ResultWas::Info && includeResults ) { m_xml.scopedElement( "Info" ) .writeText( it->message ); } else if ( it->type == ResultWas::Warning ) {