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 some test binaries in ExtraTests not having warnings enabled

Commit
919385f7046b61ae0960d02977d95674cbe20d85
Author
Martin Hořeňovský ·
Parents
15d52830ee1c

Files · Download .tar.gz

Changes

 tests/ExtraTests/CMakeLists.txt             | 50 +++++++++++++++--------------
 tests/ExtraTests/X95-InfiniteGenerators.cpp |  1 +
 2 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/tests/ExtraTests/CMakeLists.txt b/tests/ExtraTests/CMakeLists.txt
index 731bcf1c..29d72b76 100644
--- a/tests/ExtraTests/CMakeLists.txt
+++ b/tests/ExtraTests/CMakeLists.txt
@@ -526,30 +526,6 @@ set_tests_properties(TestSpecs::SkippingAllTestsFails
     WILL_FAIL ON
 )
 
-set(EXTRA_TEST_BINARIES
-  AllSkipped
-  PrefixedMacros
-  DisabledMacros
-  DisabledExceptions-DefaultHandler
-  DisabledExceptions-CustomHandler
-  FallbackStringifier
-  DisableStringification
-  PartialTestCaseEvents
-  DuplicatedTestCases-SameNameAndTags
-  DuplicatedTestCases-SameNameDifferentTags
-  DuplicatedTestCases-DuplicatedTestCaseMethods
-  NoTests
-  ListenersGetEventsBeforeReporters
-  MixingClearedAndUnclearedMessages
-#  DebugBreakMacros
-)
-
-# Notice that we are modifying EXTRA_TEST_BINARIES destructively, do not
-# use it after this point!
-list(FILTER EXTRA_TEST_BINARIES EXCLUDE REGEX "DisabledExceptions.*")
-list(APPEND CATCH_TEST_TARGETS ${EXTRA_TEST_BINARIES})
-set(CATCH_TEST_TARGETS ${CATCH_TEST_TARGETS} PARENT_SCOPE)
-
 # This sets up a one-off executable that compiles against the amalgamated
 # files, and then runs it for a super simple check that the amalgamated
 # files are usable.
@@ -603,3 +579,29 @@ set_tests_properties(Warnings::InfiniteGenerators
     PASS_REGULAR_EXPRESSION "test cases: 2 \\| 1 passed \\| 1 failed"
     TIMEOUT 5
 )
+
+set(EXTRA_TEST_BINARIES
+  AllSkipped
+  PrefixedMacros
+  DisabledMacros
+  DisabledExceptions-DefaultHandler
+  DisabledExceptions-CustomHandler
+  FallbackStringifier
+  DisableStringification
+  PartialTestCaseEvents
+  DuplicatedTestCases-SameNameAndTags
+  DuplicatedTestCases-SameNameDifferentTags
+  DuplicatedTestCases-DuplicatedTestCaseMethods
+  NoTests
+  ListenersGetEventsBeforeReporters
+  MixingClearedAndUnclearedMessages
+  InfiniteGenerators
+  ThreadSafetyTests
+#  DebugBreakMacros
+)
+
+# Notice that we are modifying EXTRA_TEST_BINARIES destructively, do not
+# use it after this point!
+list(FILTER EXTRA_TEST_BINARIES EXCLUDE REGEX "DisabledExceptions.*")
+list(APPEND CATCH_TEST_TARGETS ${EXTRA_TEST_BINARIES})
+set(CATCH_TEST_TARGETS ${CATCH_TEST_TARGETS} PARENT_SCOPE)
diff --git a/tests/ExtraTests/X95-InfiniteGenerators.cpp b/tests/ExtraTests/X95-InfiniteGenerators.cpp
index d169758f..97366281 100644
--- a/tests/ExtraTests/X95-InfiniteGenerators.cpp
+++ b/tests/ExtraTests/X95-InfiniteGenerators.cpp
@@ -33,6 +33,7 @@ namespace {
 
 TEST_CASE() {
     auto _ = GENERATE( make_infinite_generator() );
+    (void)_;
 }
 
 TEST_CASE() {