mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-18 10:55:39 +02:00
Context methods are non-static - accessed via interface
This is a move towards allowing multiple contexts - with the concept of a (possibly thread local) "current" context
This commit is contained in:
@@ -21,12 +21,12 @@ namespace Catch {
|
||||
const std::string& description,
|
||||
const SourceLineInfo& lineInfo )
|
||||
: m_name( name ),
|
||||
m_sectionIncluded( Context::getResultCapture().sectionStarted( name, description, lineInfo, m_assertions ) )
|
||||
m_sectionIncluded( getCurrentContext().getResultCapture().sectionStarted( name, description, lineInfo, m_assertions ) )
|
||||
{}
|
||||
|
||||
~Section() {
|
||||
if( m_sectionIncluded )
|
||||
Context::getResultCapture().sectionEnded( m_name, m_assertions );
|
||||
getCurrentContext().getResultCapture().sectionEnded( m_name, m_assertions );
|
||||
}
|
||||
|
||||
// This indicates whether the section should be executed or not
|
||||
|
Reference in New Issue
Block a user