parent
3c7e737a7b
commit
89f18f15ca
2 changed files with 26 additions and 0 deletions
17
projects/ExtraTests/X12-CustomDebugBreakMacro.cpp
Normal file
17
projects/ExtraTests/X12-CustomDebugBreakMacro.cpp
Normal file
|
@ -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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue