mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Integrated new AssertionHandler into unexpected exception handling in RunContext
This commit is contained in:
parent
201028d6ec
commit
7df290dfc1
@ -270,7 +270,11 @@ namespace Catch {
|
||||
// Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions
|
||||
// are reported without translation at the point of origin.
|
||||
if (m_shouldReportUnexpected) {
|
||||
makeUnexpectedResultBuilder().useActiveException();
|
||||
AssertionHandler
|
||||
( m_lastAssertionInfo.macroName,
|
||||
m_lastAssertionInfo.lineInfo,
|
||||
m_lastAssertionInfo.capturedExpression,
|
||||
m_lastAssertionInfo.resultDisposition ).useActiveException();
|
||||
}
|
||||
}
|
||||
m_testCaseTracker->close();
|
||||
@ -296,13 +300,6 @@ namespace Catch {
|
||||
fatalConditionHandler.reset();
|
||||
}
|
||||
|
||||
ResultBuilder RunContext::makeUnexpectedResultBuilder() const {
|
||||
return ResultBuilder(m_lastAssertionInfo.macroName,
|
||||
m_lastAssertionInfo.lineInfo,
|
||||
m_lastAssertionInfo.capturedExpression,
|
||||
m_lastAssertionInfo.resultDisposition);
|
||||
}
|
||||
|
||||
void RunContext::handleUnfinishedSections() {
|
||||
// If sections ended prematurely due to an exception we stored their
|
||||
// infos here so we can tear them down outside the unwind process.
|
||||
|
@ -103,8 +103,6 @@ namespace Catch {
|
||||
|
||||
private:
|
||||
|
||||
ResultBuilder makeUnexpectedResultBuilder() const;
|
||||
|
||||
void handleUnfinishedSections();
|
||||
|
||||
TestRunInfo m_runInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user