Add lineinfo to XML reporter output for INFO/WARN

Closes #1251
This commit is contained in:
Martin Hořeňovský 2023-04-10 16:32:03 +02:00
parent 50bf00e266
commit fb806da76f
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
3 changed files with 478 additions and 476 deletions

View File

@ -98,11 +98,13 @@ namespace Catch {
// Print any info messages in <Info> tags.
for( auto const& msg : assertionStats.infoMessages ) {
if( msg.type == ResultWas::Info && includeResults ) {
m_xml.scopedElement( "Info" )
.writeText( msg.message );
auto t = m_xml.scopedElement( "Info" );
writeSourceInfo( msg.lineInfo );
t.writeText( msg.message );
} else if ( msg.type == ResultWas::Warning ) {
m_xml.scopedElement( "Warning" )
.writeText( msg.message );
auto t = m_xml.scopedElement( "Warning" );
writeSourceInfo( msg.lineInfo );
t.writeText( msg.message );
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff