mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-28 07:29:25 +00:00
Section no longer relies on copy-elision for correctness
- should address #293 - *may* address #271
This commit is contained in:
parent
a469d9bc0f
commit
23181eeef0
7 changed files with 36 additions and 29 deletions
|
@ -15,10 +15,17 @@
|
|||
|
||||
namespace Catch {
|
||||
|
||||
Section::Section( SourceLineInfo const& lineInfo,
|
||||
std::string const& name,
|
||||
std::string const& description )
|
||||
: m_info( name, description, lineInfo ),
|
||||
SectionInfo::SectionInfo
|
||||
( SourceLineInfo const& _lineInfo,
|
||||
std::string const& _name,
|
||||
std::string const& _description )
|
||||
: name( _name ),
|
||||
description( _description ),
|
||||
lineInfo( _lineInfo )
|
||||
{}
|
||||
|
||||
Section::Section( SectionInfo const& info )
|
||||
: m_info( info ),
|
||||
m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) )
|
||||
{
|
||||
m_timer.start();
|
||||
|
@ -30,7 +37,7 @@ namespace Catch {
|
|||
}
|
||||
|
||||
// This indicates whether the section should be executed or not
|
||||
Section::operator bool() {
|
||||
Section::operator bool() const {
|
||||
return m_sectionIncluded;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue