From d19b7292b37548c539281587e054665f82c25a34 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Wed, 6 Dec 2017 14:30:17 +0000 Subject: [PATCH] xml reporter reports WARN message when not used with -s --- include/reporters/catch_reporter_xml.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/reporters/catch_reporter_xml.cpp b/include/reporters/catch_reporter_xml.cpp index 1ea61c0b..18da6b66 100644 --- a/include/reporters/catch_reporter_xml.cpp +++ b/include/reporters/catch_reporter_xml.cpp @@ -95,10 +95,10 @@ namespace Catch { bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); - if( includeResults ) { + if( includeResults || result.getResultType() == ResultWas::Warning ) { // Print any info messages in tags. for( auto const& msg : assertionStats.infoMessages ) { - if( msg.type == ResultWas::Info ) { + if( msg.type == ResultWas::Info && includeResults ) { m_xml.scopedElement( "Info" ) .writeText( msg.message ); } else if ( msg.type == ResultWas::Warning ) {