mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 13:55:39 +02:00
Modify generator tracking to allow GENERATEs between SECTIONs
This means that code such as ```cpp TEST_CASE() { SECTION("first") { SUCCEED(); } auto _ = GENERATE(1, 2); SECTION("second") { SUCCEED(); } } ``` will run and report 3 assertions, 1 from section "first" and 2 from section "second". This also applies for greater and potentially more confusing nesting, but fundamentally it is up to the user to avoid overly complex and confusing nestings, just as with `SECTION`s. The old behaviour of `GENERATE` as first thing in a `TEST_CASE`, `GENERATE` not followed by a `SECTION`, etc etc should be unchanged. Closes #1938
This commit is contained in:
@@ -1380,6 +1380,6 @@ due to unexpected exception with message:
|
||||
Why would you throw a std::string?
|
||||
|
||||
===============================================================================
|
||||
test cases: 343 | 269 passed | 70 failed | 4 failed as expected
|
||||
assertions: 1941 | 1789 passed | 131 failed | 21 failed as expected
|
||||
test cases: 348 | 274 passed | 70 failed | 4 failed as expected
|
||||
assertions: 1983 | 1831 passed | 131 failed | 21 failed as expected
|
||||
|
||||
|
Reference in New Issue
Block a user