• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // X12-CustomDebugBreakMacro.cpp
2 // Test that user-defined `CATCH_BREAK_INTO_DEBUGGER` is respected and used.
3 
4 #include <iostream>
5 
custom_debug_break()6 void custom_debug_break() {
7     std::cerr << "Pretty please, break into debugger\n";
8 }
9 
10 #define CATCH_BREAK_INTO_DEBUGGER() custom_debug_break()
11 
12 #define CATCH_CONFIG_MAIN
13 #include <catch2/catch.hpp>
14 
15 TEST_CASE("Failing test that breaks into debugger", "[macros]") {
16     REQUIRE(1 == 2);
17 }
18