mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-24 06:16:10 +01:00
Include Info messages in xml reporter even without -s
This commit is contained in:
parent
2d91035404
commit
84e8b696b1
@ -97,12 +97,12 @@ namespace Catch {
|
|||||||
|
|
||||||
bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();
|
bool includeResults = m_config->includeSuccessfulResults() || !result.isOk();
|
||||||
|
|
||||||
if( includeResults ) {
|
if( includeResults || result.getResultType() == ResultWas::Warning ) {
|
||||||
// Print any info messages in <Info> tags.
|
// Print any info messages in <Info> tags.
|
||||||
for( std::vector<MessageInfo>::const_iterator it = assertionStats.infoMessages.begin(), itEnd = assertionStats.infoMessages.end();
|
for( std::vector<MessageInfo>::const_iterator it = assertionStats.infoMessages.begin(), itEnd = assertionStats.infoMessages.end();
|
||||||
it != itEnd;
|
it != itEnd;
|
||||||
++it ) {
|
++it ) {
|
||||||
if( it->type == ResultWas::Info ) {
|
if( it->type == ResultWas::Info && includeResults ) {
|
||||||
m_xml.scopedElement( "Info" )
|
m_xml.scopedElement( "Info" )
|
||||||
.writeText( it->message );
|
.writeText( it->message );
|
||||||
} else if ( it->type == ResultWas::Warning ) {
|
} else if ( it->type == ResultWas::Warning ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user