mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 22:19:25 +00:00
SectionInfo now goes via new streaming reporter interface
This commit is contained in:
parent
95df676a27
commit
ad6701d222
5 changed files with 59 additions and 41 deletions
|
@ -20,13 +20,13 @@ namespace Catch {
|
|||
Section( const std::string& name,
|
||||
const std::string& description,
|
||||
const SourceLineInfo& lineInfo )
|
||||
: m_name( name ),
|
||||
m_sectionIncluded( getCurrentContext().getResultCapture().sectionStarted( name, description, lineInfo, m_assertions ) )
|
||||
: m_info( name, description, lineInfo ),
|
||||
m_sectionIncluded( getCurrentContext().getResultCapture().sectionStarted( m_info, m_assertions ) )
|
||||
{}
|
||||
|
||||
~Section() {
|
||||
if( m_sectionIncluded )
|
||||
getCurrentContext().getResultCapture().sectionEnded( m_name, m_assertions );
|
||||
getCurrentContext().getResultCapture().sectionEnded( m_info, m_assertions );
|
||||
}
|
||||
|
||||
// This indicates whether the section should be executed or not
|
||||
|
@ -35,6 +35,7 @@ namespace Catch {
|
|||
}
|
||||
|
||||
private:
|
||||
SectionInfo m_info;
|
||||
|
||||
std::string m_name;
|
||||
Counts m_assertions;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue