diff options
| author | Martin Hořeňovský | 2020-02-18 10:20:28 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-18 10:20:37 +0100 |
| commit | 06c135706eba87010c73deb9036611e6a63f756d (patch) | |
| tree | 668e9c31ae897ff49710c1b7075f98b2663fd3e8 /tests/ExtraTests/X12-CustomDebugBreakMacro.cpp | |
| parent | ae1d21315c1c9401bc3fe662cb5b4d4f15cc666b (diff) | |
| download | catch3-06c135706eba87010c73deb9036611e6a63f756d.tar.gz | |
Move X12-CustomDebugBreakMacro.cpp to the right place
This is a small fixup because cherry-picking the relevant commit
threw it into the wrong place...
Diffstat (limited to 'tests/ExtraTests/X12-CustomDebugBreakMacro.cpp')
| -rw-r--r-- | tests/ExtraTests/X12-CustomDebugBreakMacro.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp b/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp new file mode 100644 index 00000000..25ab4a0e --- /dev/null +++ b/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp @@ -0,0 +1,17 @@ +// X12-CustomDebugBreakMacro.cpp +// Test that user-defined `CATCH_BREAK_INTO_DEBUGGER` is respected and used. + +#include <iostream> + +void custom_debug_break() { + std::cerr << "Pretty please, break into debugger\n"; +} + +#define CATCH_BREAK_INTO_DEBUGGER() custom_debug_break() + +#define CATCH_CONFIG_MAIN +#include <catch2/catch.hpp> + +TEST_CASE("Failing test that breaks into debugger", "[macros]") { + REQUIRE(1 == 2); +} |