catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
xml reporter reports WARN message when not used with -s
- Commit
d19b7292b37548c539281587e054665f82c25a34- Author
- Phil Nash ·
- Parents
5e063616dfc2
Changes
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 <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 ) {