xml reporter reports WARN message when not used with -s

This commit is contained in:
Phil Nash 2017-12-06 14:30:17 +00:00
parent 5e063616df
commit d19b7292b3

View File

@ -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 <Info> 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 ) {