Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Added attribution for __debugbreak()

Commit
ab30ab6b761de80800a3eb0d25a9f2d5d72817d3
Author
Phil Nash ·
Parents
73acd945cdc7

Files · Download .tar.gz

Changes

 internal/catch_debugger.hpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/internal/catch_debugger.hpp b/internal/catch_debugger.hpp
index 5d867aa1..dc3aec24 100644
--- a/internal/catch_debugger.hpp
+++ b/internal/catch_debugger.hpp
@@ -78,9 +78,10 @@
         #endif
     #endif
 
-#elif defined(__WIN32__) && defined(_MSC_VER)

-   extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent();

-   #define BreakIntoDebugger() if (IsDebuggerPresent() ) { __debugbreak(); }

+#elif defined(__WIN32__) && defined(_MSC_VER)
+// Thanks to jalfd for the following:
+   extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent();
+   #define BreakIntoDebugger() if (IsDebuggerPresent() ) { __debugbreak(); }
 #else
 	   inline void BreakIntoDebugger(){}
 #endif