Add version field to the XML reporter output

We start at version 2, with version 1 being taken up by the output
from Catch2 v2.
This commit is contained in:
Martin Hořeňovský
2022-11-10 12:02:59 +01:00
parent 066cc51ce6
commit 943c6e3dee
3 changed files with 3 additions and 2 deletions

View File

@@ -56,6 +56,7 @@ namespace Catch {
m_xml.startElement("Catch2TestRun")
.writeAttribute("name"_sr, m_config->name())
.writeAttribute("rng-seed"_sr, m_config->rngSeed())
.writeAttribute("xml-format-version"_sr, 2)
.writeAttribute("catch2-version"_sr, libraryVersion());
if ( m_config->testSpec().hasFilters() ) {
m_xml.writeAttribute( "filters"_sr, m_config->testSpec() );