diff options
| author | Martin Hořeňovský | 2022-05-03 19:44:55 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-05-03 19:46:35 +0200 |
| commit | d9b0a38f81df4bd5876888ba7937f5750b59b5a5 (patch) | |
| tree | 70660298cd819f1e747c586f4e7c5646a9706eac /src/catch2 | |
| parent | 40c8909a49c3edcab626de79b9d3a33db6098b00 (diff) | |
| download | catch3-d9b0a38f81df4bd5876888ba7937f5750b59b5a5.tar.gz | |
Report Catch2's version in the xml reporter output
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/reporters/catch_reporter_xml.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/catch2/reporters/catch_reporter_xml.cpp b/src/catch2/reporters/catch_reporter_xml.cpp index b34d7679..b8b93235 100644 --- a/src/catch2/reporters/catch_reporter_xml.cpp +++ b/src/catch2/reporters/catch_reporter_xml.cpp @@ -14,6 +14,7 @@ #include <catch2/internal/catch_list.hpp> #include <catch2/catch_test_case_info.hpp> #include <catch2/internal/catch_move_and_forward.hpp> +#include <catch2/catch_version.hpp> #if defined(_MSC_VER) #pragma warning(push) @@ -54,7 +55,8 @@ namespace Catch { m_xml.writeStylesheetRef( stylesheetRef ); m_xml.startElement("Catch2TestRun") .writeAttribute("name"_sr, m_config->name()) - .writeAttribute("rng-seed"_sr, m_config->rngSeed()); + .writeAttribute("rng-seed"_sr, m_config->rngSeed()) + .writeAttribute("catch2-version"_sr, libraryVersion()); if (m_config->testSpec().hasFilters()) m_xml.writeAttribute( "filters"_sr, serializeFilters( m_config->getTestsOrTags() ) ); } |