catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Fix for JUnit reporter when using dynamically generated sections (#963)
- Commit
d65091fa06b02bac5969e44ca877b3ab0c73734d- Author
- Fran García Salomón ·
- Committer
- Martin Hořeňovský
- Parents
7a22bad76340
Changes
include/reporters/catch_reporter_bases.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/reporters/catch_reporter_bases.hpp b/include/reporters/catch_reporter_bases.hpp index de7d96d5..9df096c7 100644 --- a/include/reporters/catch_reporter_bases.hpp +++ b/include/reporters/catch_reporter_bases.hpp @@ -137,7 +137,8 @@ namespace Catch { BySectionInfo( SectionInfo const& other ) : m_other( other ) {} BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} bool operator() ( Ptr<SectionNode> const& node ) const { - return node->stats.sectionInfo.lineInfo == m_other.lineInfo; + return ((node->stats.sectionInfo.name == m_other.name) && + (node->stats.sectionInfo.lineInfo == m_other.lineInfo)); } private: void operator=( BySectionInfo const& );