diff options
| author | Martin Hořeňovský | 2022-11-10 12:02:59 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-11-10 12:04:51 +0100 |
| commit | 943c6e3deea38cd06dab722ffe5504e2e39bce27 (patch) | |
| tree | 17f2f29de5bafe798b4455e40b2c585f3c9d57cb | |
| parent | 066cc51ce657a3d787ec228e8af22830a92723fc (diff) | |
| download | catch3-943c6e3deea38cd06dab722ffe5504e2e39bce27.tar.gz | |
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.
| -rw-r--r-- | src/catch2/reporters/catch_reporter_xml.cpp | 1 | ||||
| -rw-r--r-- | tests/SelfTest/Baselines/xml.sw.approved.txt | 2 | ||||
| -rw-r--r-- | tests/SelfTest/Baselines/xml.sw.multi.approved.txt | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp index ec156f35..57fa1cab 100644 --- a/src/catch2/reporters/catch_reporter_xml.cpp +++ b/src/catch2/reporters/catch_reporter_xml.cpp @@ -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() ); diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt index 0e853bfe..4ff2e4f2 100644 --- a/tests/SelfTest/Baselines/xml.sw.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.approved.txt @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<Catch2TestRun name="<exe-name>" rng-seed="1" catch2-version="<version>" filters=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"> +<Catch2TestRun name="<exe-name>" rng-seed="1" xml-format-version="2" catch2-version="<version>" filters=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"> <TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <OverallResult success="true"/> </TestCase> diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt index 06be5f0c..a0096170 100644 --- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<Catch2TestRun name="<exe-name>" rng-seed="1" catch2-version="<version>" filters=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"> +<Catch2TestRun name="<exe-name>" rng-seed="1" xml-format-version="2" catch2-version="<version>" filters=""*" ~[!nonportable] ~[!benchmark] ~[approvals]"> <TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" > <OverallResult success="true"/> </TestCase> |