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
This commit is contained in:
Fran García Salomón 2017-07-23 17:13:44 +02:00 committed by Martin Hořeňovský
parent cde987a92e
commit 4f72202c04
1 changed files with 4 additions and 3 deletions

View File

@ -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;