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

Fix missing pragma warning(pop) and other warnings under MSVC

Fixes #1072
Commit
57b4e0b64ce00c7e6d43e509071127debf4d12f1
Author
Martin Hořeňovský ·
Parents
75a77b6f8cf4

Files · Download .tar.gz

Changes

 include/internal/catch_compiler_capabilities.h | 2 +-
 include/internal/catch_decomposer.h            | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/internal/catch_compiler_capabilities.h b/include/internal/catch_compiler_capabilities.h
index e7d506ed..96ddd800 100644
--- a/include/internal/catch_compiler_capabilities.h
+++ b/include/internal/catch_compiler_capabilities.h
@@ -82,7 +82,7 @@
 
 // Universal Windows platform does not support SEH
 // Or console colours (or console at all...)
-#  if (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+#  if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
 #    define CATCH_CONFIG_COLOUR_NONE
 #  else
 #    define CATCH_INTERNAL_CONFIG_WINDOWS_SEH
diff --git a/include/internal/catch_decomposer.h b/include/internal/catch_decomposer.h
index fee24e72..38b62f45 100644
--- a/include/internal/catch_decomposer.h
+++ b/include/internal/catch_decomposer.h
@@ -162,4 +162,8 @@ namespace Catch {
 
 } // end namespace Catch
 
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
 #endif // TWOBLUECUBES_CATCH_DECOMPOSER_H_INCLUDED