We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
catch_discover_tests
TEST_CASE
1 parent 914aeec commit 76f70b1Copy full SHA for 76f70b1
extras/CatchAddTests.cmake
@@ -143,6 +143,12 @@ function(catch_discover_tests_impl)
143
# Speed-up reparsing by cutting away unneeded parts of JSON.
144
string(JSON test_listing GET "${listing_output}" "listings" "tests")
145
string(JSON num_tests LENGTH "${test_listing}")
146
+
147
+ # Exit early if no tests are detected
148
+ if(num_tests STREQUAL "0")
149
+ return()
150
+ endif()
151
152
# CMake's foreach-RANGE is inclusive, so we have to subtract 1
153
math(EXPR num_tests "${num_tests} - 1")
154
0 commit comments