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

Improve test for --warn InfiniteGenerators

Commit
b6c7b217d4bcb5030ce1e04180f35d02bcf5d93f
Author
Martin Hořeňovský ·
Parents
045ac7acce52

Files · Download .tar.gz

Changes

 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);
+}