Skip to content

Commit b2b7cbd

Browse files
committed
Remove pointless internal macro
1 parent 412cad5 commit b2b7cbd

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

src/catch2/catch_message.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ namespace Catch {
9494
do { \
9595
Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \
9696
catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \
97-
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
97+
catchAssertionHandler.complete(); \
9898
} while( false )
9999

100100
///////////////////////////////////////////////////////////////////////////////

src/catch2/internal/catch_test_macro_impl.hpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838

3939
#endif
4040

41-
#define INTERNAL_CATCH_REACT( handler ) handler.complete();
42-
4341
///////////////////////////////////////////////////////////////////////////////
4442
#define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \
4543
do { /* NOLINT(bugprone-infinite-loop) */ \
@@ -52,7 +50,7 @@
5250
catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); /* NOLINT(bugprone-chained-comparison) */ \
5351
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
5452
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
55-
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
53+
catchAssertionHandler.complete(); \
5654
} while( (void)0, (false) && static_cast<const bool&>( !!(__VA_ARGS__) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look
5755
// The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&.
5856

@@ -80,7 +78,7 @@
8078
catch( ... ) { \
8179
catchAssertionHandler.handleUnexpectedInflightException(); \
8280
} \
83-
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
81+
catchAssertionHandler.complete(); \
8482
} while( false )
8583

8684
///////////////////////////////////////////////////////////////////////////////
@@ -101,7 +99,7 @@
10199
} \
102100
else \
103101
catchAssertionHandler.handleThrowingCallSkipped(); \
104-
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
102+
catchAssertionHandler.complete(); \
105103
} while( false )
106104

107105
///////////////////////////////////////////////////////////////////////////////
@@ -125,7 +123,7 @@
125123
} \
126124
else \
127125
catchAssertionHandler.handleThrowingCallSkipped(); \
128-
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
126+
catchAssertionHandler.complete(); \
129127
} while( false )
130128

131129

@@ -149,7 +147,7 @@
149147
} \
150148
else \
151149
catchAssertionHandler.handleThrowingCallSkipped(); \
152-
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
150+
catchAssertionHandler.complete(); \
153151
} while( false )
154152

155153
#endif // CATCH_CONFIG_DISABLE

src/catch2/matchers/internal/catch_matchers_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ namespace Catch {
7777
INTERNAL_CATCH_TRY { \
7878
catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher ) ); \
7979
} INTERNAL_CATCH_CATCH( catchAssertionHandler ) \
80-
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
80+
catchAssertionHandler.complete(); \
8181
} while( false )
8282

8383

@@ -101,7 +101,7 @@ namespace Catch {
101101
} \
102102
else \
103103
catchAssertionHandler.handleThrowingCallSkipped(); \
104-
INTERNAL_CATCH_REACT( catchAssertionHandler ) \
104+
catchAssertionHandler.complete(); \
105105
} while( false )
106106

107107

0 commit comments

Comments
 (0)