From 919385f7046b61ae0960d02977d95674cbe20d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Mon, 6 Jul 2026 10:22:55 +0200 Subject: [PATCH] Fix some test binaries in ExtraTests not having warnings enabled --- 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() {