From b6c7b217d4bcb5030ce1e04180f35d02bcf5d93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Fri, 13 Feb 2026 21:30:26 +0100 Subject: [PATCH] Improve test for --warn InfiniteGenerators --- tests/ExtraTests/CMakeLists.txt | 3 ++- tests/ExtraTests/X95-InfiniteGenerators.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/ExtraTests/CMakeLists.txt b/tests/ExtraTests/CMakeLists.txt index d663efc8..def88be5 100644 --- a/tests/ExtraTests/CMakeLists.txt +++ b/tests/ExtraTests/CMakeLists.txt @@ -599,6 +599,7 @@ add_test( ) set_tests_properties(Warnings::InfiniteGenerators PROPERTIES - PASS_REGULAR_EXPRESSION "test cases: 1 \\| 1 failed" + # One test case fails with infinite generator, but the other one runs + PASS_REGULAR_EXPRESSION "test cases: 2 \\| 1 passed \\| 1 failed" TIMEOUT 5 ) diff --git a/tests/ExtraTests/X95-InfiniteGenerators.cpp b/tests/ExtraTests/X95-InfiniteGenerators.cpp index 31389107..d169758f 100644 --- a/tests/ExtraTests/X95-InfiniteGenerators.cpp +++ b/tests/ExtraTests/X95-InfiniteGenerators.cpp @@ -34,3 +34,7 @@ namespace { TEST_CASE() { auto _ = GENERATE( make_infinite_generator() ); } + +TEST_CASE() { + REQUIRE(true); +}