diff options
| author | Fran García Salomón | 2017-07-23 17:13:44 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-08-01 22:25:16 +0200 |
| commit | 4f72202c040ac02b9dcee0166faea514775b2127 (patch) | |
| tree | 49a7f11394dfdf47c6257f45a26822cf9da3c4ea /include | |
| parent | cde987a92ee6f299462e5fb11fc35f4587e047c0 (diff) | |
| download | catch3-4f72202c040ac02b9dcee0166faea514775b2127.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 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/reporters/catch_reporter_bases.hpp b/include/reporters/catch_reporter_bases.hpp index 6d627839..5e86e7c2 100644 --- a/include/reporters/catch_reporter_bases.hpp +++ b/include/reporters/catch_reporter_bases.hpp @@ -125,10 +125,11 @@ namespace Catch { }; struct BySectionInfo { - BySectionInfo(SectionInfo const& other) : m_other(other) {} - BySectionInfo(BySectionInfo const& other) : m_other(other.m_other) {} + BySectionInfo( SectionInfo const& other ) : m_other( other ) {} + BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} bool operator() (std::shared_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)); } void operator=(BySectionInfo const&) = delete; |