Integrated new AssertionHandler into unexpected exception handling in RunContext

This commit is contained in:
Phil Nash 2017-08-09 08:49:59 +01:00
parent 201028d6ec
commit 7df290dfc1
2 changed files with 5 additions and 10 deletions

View File

@ -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.

View File

@ -103,8 +103,6 @@ namespace Catch {
private:
ResultBuilder makeUnexpectedResultBuilder() const;
void handleUnfinishedSections();
TestRunInfo m_runInfo;