Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-02-18 10:20:28 +0100
committerMartin Hořeňovský2020-02-18 10:20:37 +0100
commit06c135706eba87010c73deb9036611e6a63f756d (patch)
tree668e9c31ae897ff49710c1b7075f98b2663fd3e8 /tests
parentae1d21315c1c9401bc3fe662cb5b4d4f15cc666b (diff)
downloadcatch3-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')
-rw-r--r--tests/ExtraTests/X12-CustomDebugBreakMacro.cpp17
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);
+}