-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for custom debug break macros
See #1846
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters