Skip to content

Commit 84e8b69

Browse files
committed
Include Info messages in xml reporter even without -s
1 parent 2d91035 commit 84e8b69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/reporters/catch_reporter_xml.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ namespace Catch {
9797

9898
bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();
9999

100-
if( includeResults ) {
100+
if( includeResults || result.getResultType() == ResultWas::Warning ) {
101101
// Print any info messages in <Info> tags.
102102
for( std::vector<MessageInfo>::const_iterator it = assertionStats.infoMessages.begin(), itEnd = assertionStats.infoMessages.end();
103103
it != itEnd;
104104
++it ) {
105-
if( it->type == ResultWas::Info ) {
105+
if( it->type == ResultWas::Info && includeResults ) {
106106
m_xml.scopedElement( "Info" )
107107
.writeText( it->message );
108108
} else if ( it->type == ResultWas::Warning ) {

0 commit comments

Comments
 (0)