diff options
| author | Fran García Salomón | 2017-07-23 17:13:44 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-07-23 17:13:44 +0200 |
| commit | d65091fa06b02bac5969e44ca877b3ab0c73734d (patch) | |
| tree | d46521f5e8e705bc6615faacf6d985423bb75398 /include | |
| parent | 7a22bad76340f8b48094b46bc586e76ac9ea93ac (diff) | |
| download | catch3-d65091fa06b02bac5969e44ca877b3ab0c73734d.tar.gz | |
Fix for JUnit reporter when using dynamically generated sections (#963)
* BySectionInfo should also take into account the section name in addition to the source code line
Diffstat (limited to 'include')
| -rw-r--r-- | include/reporters/catch_reporter_bases.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
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& ); |