Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_run_context.cpp
diff options
context:
space:
mode:
authorPhil Nash2017-08-09 08:49:59 +0100
committerPhil Nash2017-08-09 08:49:59 +0100
commit7df290dfc1a064d087f5252bc1aac5e832a16d7e (patch)
tree6a6c98e9087724cddec8e992916f1064ee4092d4 /include/internal/catch_run_context.cpp
parent201028d6ec787aa92ae12656804b807d2ec849a2 (diff)
downloadcatch3-7df290dfc1a064d087f5252bc1aac5e832a16d7e.tar.gz
Integrated new AssertionHandler into unexpected exception handling in RunContext
Diffstat (limited to 'include/internal/catch_run_context.cpp')
-rw-r--r--include/internal/catch_run_context.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/internal/catch_run_context.cpp b/include/internal/catch_run_context.cpp
index 509a18e6..b0479797 100644
--- a/include/internal/catch_run_context.cpp
+++ b/include/internal/catch_run_context.cpp
@@ -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.