Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-04-10 16:32:03 +0200
committerMartin Hořeňovský2023-04-10 16:32:07 +0200
commitfb806da76f9b9fdeecd5d09269f03e6a7c5175e7 (patch)
tree7a40c8ce147e4f65b98faf935b5013d0ea7b3688 /src/catch2
parent50bf00e266b32531385c9098f2676875c0aa8ac2 (diff)
downloadcatch3-fb806da76f9b9fdeecd5d09269f03e6a7c5175e7.tar.gz
Add lineinfo to XML reporter output for INFO/WARN
Closes #1251
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/reporters/catch_reporter_xml.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp
index 13812b92..d90295bb 100644
--- a/src/catch2/reporters/catch_reporter_xml.cpp
+++ b/src/catch2/reporters/catch_reporter_xml.cpp
@@ -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 );
}
}
}