mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 14:09:26 +00:00
Fixed line/no regression for SECTIONs
Unexpected exceptions within a section now get the SECTION's line no. again (instead of TEST_CASE line/no)
This commit is contained in:
parent
78fba28c4b
commit
b323fc7e6c
5 changed files with 7 additions and 14 deletions
|
@ -174,13 +174,11 @@ namespace Catch {
|
|||
oss << name << "@" << lineInfo;
|
||||
|
||||
|
||||
m_assertionInfoStack.push_back( m_lastAssertionInfo );
|
||||
m_lastAssertionInfo = AssertionInfo( "SECTION", lineInfo );
|
||||
|
||||
|
||||
if( !m_runningTest->addSection( oss.str() ) )
|
||||
return false;
|
||||
|
||||
m_lastAssertionInfo.lineInfo = lineInfo;
|
||||
|
||||
m_reporter->StartSection( name, description );
|
||||
assertions = m_totals.assertions;
|
||||
|
||||
|
@ -198,8 +196,6 @@ namespace Catch {
|
|||
}
|
||||
m_runningTest->endSection( name );
|
||||
m_reporter->EndSection( name, assertions );
|
||||
m_lastAssertionInfo = m_assertionInfoStack.back();
|
||||
m_assertionInfoStack.pop_back();
|
||||
}
|
||||
|
||||
virtual void pushScopedInfo( ScopedInfo* scopedInfo ) {
|
||||
|
@ -296,7 +292,6 @@ namespace Catch {
|
|||
IResultCapture* m_prevResultCapture;
|
||||
const IConfig* m_prevConfig;
|
||||
AssertionInfo m_lastAssertionInfo;
|
||||
std::vector<AssertionInfo> m_assertionInfoStack;
|
||||
};
|
||||
|
||||
} // end namespace Catch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue