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

Use _WIN32 macro for detecting MSVC Windows

Previously we used `WIN32`, which sometimes does exist, but according to
https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019
`_WIN32` is the one that is actually provided by the compiler.

Closes #1676.
Commit
11488e63b694176951e991ad87c9ef7c76db50c9
Author
Martin Hořeňovský ·
Parents
820271bf246a

Files · Download .tar.gz

Changes

 include/internal/catch_session.cpp | 2 +-
 include/internal/catch_session.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp
index 5aee5d99..f9818f74 100644
--- a/include/internal/catch_session.cpp
+++ b/include/internal/catch_session.cpp
@@ -197,7 +197,7 @@ namespace Catch {
         return 0;
     }
 
-#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
+#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
     int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {
 
         char **utf8Argv = new char *[ argc ];
diff --git a/include/internal/catch_session.h b/include/internal/catch_session.h
index af820da4..4e83d520 100644
--- a/include/internal/catch_session.h
+++ b/include/internal/catch_session.h
@@ -26,7 +26,7 @@ namespace Catch {
         void libIdentify();
 
         int applyCommandLine( int argc, char const * const * argv );
-    #if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
+    #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
         int applyCommandLine( int argc, wchar_t const * const * argv );
     #endif