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 warning suppression block in Condition.tests straddling includes

Commit
fe2a20ab555ec28af47acaeafdad6d0872f7cb82
Author
Martin Hořeňovský ·
Parents
51b0532d1fba

Files · Download .tar.gz

Changes

 tests/SelfTest/UsageTests/Condition.tests.cpp | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/tests/SelfTest/UsageTests/Condition.tests.cpp b/tests/SelfTest/UsageTests/Condition.tests.cpp
index 211dd3b9..922d44d2 100644
--- a/tests/SelfTest/UsageTests/Condition.tests.cpp
+++ b/tests/SelfTest/UsageTests/Condition.tests.cpp
@@ -6,15 +6,6 @@
 
 // SPDX-License-Identifier: BSL-1.0
 
-#ifdef __clang__
-#   pragma clang diagnostic push
-#   pragma clang diagnostic ignored "-Wpadded"
-// Wdouble-promotion is not supported until 3.8
-#   if (__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ > 7)
-#       pragma clang diagnostic ignored "-Wdouble-promotion"
-#   endif
-#endif
-
 #include <catch2/catch_approx.hpp>
 #include <catch2/catch_test_macros.hpp>
 
@@ -24,6 +15,16 @@ using Catch::Approx;
 #include <limits>
 #include <cstdint>
 
+#ifdef __clang__
+#    pragma clang diagnostic push
+#    pragma clang diagnostic ignored "-Wpadded"
+// Wdouble-promotion is not supported until 3.8
+#    if ( __clang_major__ > 3 ) || \
+        ( __clang_major__ == 3 && __clang_minor__ > 7 )
+#        pragma clang diagnostic ignored "-Wdouble-promotion"
+#    endif
+#endif
+
 namespace {
 
     struct TestData {