Skip to content

Commit d3b304e

Browse files
committed
AssertionHandler calls into RunContext directly
1 parent e83218c commit d3b304e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/catch2/internal/catch_assertion_handler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
// SPDX-License-Identifier: BSL-1.0
88
#include <catch2/internal/catch_assertion_handler.hpp>
9-
#include <catch2/interfaces/catch_interfaces_capture.hpp>
109
#include <catch2/interfaces/catch_interfaces_config.hpp>
1110
#include <catch2/internal/catch_context.hpp>
1211
#include <catch2/internal/catch_debugger.hpp>
12+
#include <catch2/internal/catch_run_context.hpp>
1313
#include <catch2/internal/catch_test_failure_exception.hpp>
1414
#include <catch2/matchers/catch_matchers_string.hpp>
1515

@@ -25,7 +25,7 @@ namespace Catch {
2525
StringRef capturedExpression,
2626
ResultDisposition::Flags resultDisposition )
2727
: m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition },
28-
m_resultCapture( getResultCapture() )
28+
m_resultCapture( static_cast<RunContext&>(getResultCapture()) )
2929
{
3030
m_resultCapture.notifyAssertionStarted( m_assertionInfo );
3131
}

src/catch2/internal/catch_assertion_handler.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
namespace Catch {
1717

18-
class IResultCapture;
18+
class RunContext;
1919

2020
struct AssertionReaction {
2121
bool shouldDebugBreak = false;
@@ -27,7 +27,7 @@ namespace Catch {
2727
AssertionInfo m_assertionInfo;
2828
AssertionReaction m_reaction;
2929
bool m_completed = false;
30-
IResultCapture& m_resultCapture;
30+
RunContext& m_resultCapture;
3131

3232
void finishIncomplete();
3333

0 commit comments

Comments
 (0)