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

summaryrefslogtreecommitdiffhomepage
path: root/include
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
parent201028d6ec787aa92ae12656804b807d2ec849a2 (diff)
downloadcatch3-7df290dfc1a064d087f5252bc1aac5e832a16d7e.tar.gz
Integrated new AssertionHandler into unexpected exception handling in RunContext
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_run_context.cpp13
-rw-r--r--include/internal/catch_run_context.hpp2
2 files changed, 5 insertions, 10 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.
diff --git a/include/internal/catch_run_context.hpp b/include/internal/catch_run_context.hpp
index 9e9f8974..a356e3bf 100644
--- a/include/internal/catch_run_context.hpp
+++ b/include/internal/catch_run_context.hpp
@@ -103,8 +103,6 @@ namespace Catch {
private:
- ResultBuilder makeUnexpectedResultBuilder() const;
-
void handleUnfinishedSections();
TestRunInfo m_runInfo;