Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorFran García Salomón2017-07-23 17:13:44 +0200
committerMartin Hořeňovský2017-07-23 17:13:44 +0200
commitd65091fa06b02bac5969e44ca877b3ab0c73734d (patch)
treed46521f5e8e705bc6615faacf6d985423bb75398 /include
parent7a22bad76340f8b48094b46bc586e76ac9ea93ac (diff)
downloadcatch3-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.hpp3
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& );