X12-CustomDebugBreakMacro.cpp 422 B

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