mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
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:
parent
066cc51ce6
commit
943c6e3dee
@ -56,6 +56,7 @@ namespace Catch {
|
|||||||
m_xml.startElement("Catch2TestRun")
|
m_xml.startElement("Catch2TestRun")
|
||||||
.writeAttribute("name"_sr, m_config->name())
|
.writeAttribute("name"_sr, m_config->name())
|
||||||
.writeAttribute("rng-seed"_sr, m_config->rngSeed())
|
.writeAttribute("rng-seed"_sr, m_config->rngSeed())
|
||||||
|
.writeAttribute("xml-format-version"_sr, 2)
|
||||||
.writeAttribute("catch2-version"_sr, libraryVersion());
|
.writeAttribute("catch2-version"_sr, libraryVersion());
|
||||||
if ( m_config->testSpec().hasFilters() ) {
|
if ( m_config->testSpec().hasFilters() ) {
|
||||||
m_xml.writeAttribute( "filters"_sr, m_config->testSpec() );
|
m_xml.writeAttribute( "filters"_sr, m_config->testSpec() );
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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" >
|
<TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" >
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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" >
|
<TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" >
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
|
Loading…
Reference in New Issue
Block a user