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-08-01 22:25:16 +0200
commit4f72202c040ac02b9dcee0166faea514775b2127 (patch)
tree49a7f11394dfdf47c6257f45a26822cf9da3c4ea /include
parentcde987a92ee6f299462e5fb11fc35f4587e047c0 (diff)
downloadcatch3-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.hpp7
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;