mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 22:05: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:
@@ -122,6 +122,15 @@
|
||||
<testCase name="weighted_average_quantile" duration="{duration}"/>
|
||||
</file>
|
||||
<file path="tests/<exe-name>/IntrospectiveTests/PartTracker.tests.cpp">
|
||||
<testCase name="#1938 - GENERATE after a section/A" duration="{duration}"/>
|
||||
<testCase name="#1938 - GENERATE after a section/B" duration="{duration}"/>
|
||||
<testCase name="#1938 - Section followed by flat generate" duration="{duration}"/>
|
||||
<testCase name="#1938 - Section followed by flat generate/A" duration="{duration}"/>
|
||||
<testCase name="#1938 - flat generate" duration="{duration}"/>
|
||||
<testCase name="#1938 - mixed sections and generates" duration="{duration}"/>
|
||||
<testCase name="#1938 - mixed sections and generates/A" duration="{duration}"/>
|
||||
<testCase name="#1938 - mixed sections and generates/B" duration="{duration}"/>
|
||||
<testCase name="#1938 - nested generate" duration="{duration}"/>
|
||||
<testCase name="Tracker" duration="{duration}"/>
|
||||
<testCase name="Tracker/successfully close one section" duration="{duration}"/>
|
||||
<testCase name="Tracker/fail one section" duration="{duration}"/>
|
||||
|
Reference in New Issue
Block a user