catch2/projects/SelfTest/UsageTests
Martin Hořeňovský 765ac08f08
Fix potential infinite loops in generators combined with section filter
The problem was that under specific circumstances, namely that none
of their children progressed, `GeneratorTracker` will not progress.
This was changed recently, to allow for code like this, where a
`SECTION` follows a `GENERATE` at the same level:

```cpp
SECTION("A") {}
auto a = GENERATE(1, 2);
SECTION("B") {}
```

However, this interacted badly with `SECTION` filters (`-c foo`),
as they could deactivate all `SECTION`s below a generator, and thus
stop it from progressing forever. This commit makes GeneratorTracker
check whether there are any filters active, and if they are, it checks
whether its section-children can ever run.

Fixes #2025
2020-10-31 18:04:15 +01:00
..
Approx.tests.cpp Add test for INF == Approx(1) 2019-10-04 14:19:39 +02:00
BDD.tests.cpp Add test for AND_GIVEN and update the baselines 2018-09-02 16:53:57 +02:00
Benchmark.tests.cpp Fix wrong namespacing of benchmarking constructor helpers 2019-11-21 16:22:04 +01:00
Class.tests.cpp tests for TEMPLATE_LIST_TEST_CASE 2019-06-15 15:40:39 +02:00
Compilation.tests.cpp Add support for bitwise xor to the decomposer 2020-04-21 19:27:12 +02:00
Condition.tests.cpp Enable Werror for dev builds 2017-11-21 18:55:28 +01:00
Decomposition.tests.cpp Add -Wmissing-declarations to the SelfTest project 2018-07-02 17:36:13 +02:00
EnumToString.tests.cpp Removed redundant ; 2019-04-27 18:50:05 +01:00
Exception.tests.cpp Suppress Wunreachable-code in floating matchers and exception tests 2018-09-01 22:34:29 +02:00
Generators.tests.cpp Modify generator tracking to allow GENERATEs between SECTIONs 2020-07-11 23:16:07 +02:00
Matchers.tests.cpp Add explicit test for shortcircuiting behaviour of combined matchers 2020-06-14 21:48:08 +02:00
Message.tests.cpp Allow quotes in CAPTURE arguments (#1608) 2019-05-01 19:12:44 +02:00
Misc.tests.cpp Fix copy paste error in 7-arg TEMPLATE_TEST_CASE_SIG implementation 2020-06-13 15:46:59 +02:00
ToStringByte.tests.cpp Add std::byte stringification support (#1686) 2019-07-13 14:47:56 +02:00
ToStringChrono.tests.cpp Add more weird chrono::duration stringification tests 2017-11-28 21:47:06 +01:00
ToStringGeneral.tests.cpp Refactor custom precision in floating point stringification 2019-05-03 15:38:06 +02:00
ToStringOptional.tests.cpp Add to string for std::optional 2019-01-31 15:35:13 +01:00
ToStringPair.tests.cpp All tests files have .tests.cpp suffix. Also moved tests out of TestMain.cpp and moved up a level 2017-11-13 16:03:27 +00:00
ToStringTuple.tests.cpp All tests files have .tests.cpp suffix. Also moved tests out of TestMain.cpp and moved up a level 2017-11-13 16:03:27 +00:00
ToStringVariant.tests.cpp Warning fixes in examples and tests 2019-10-31 14:29:59 +01:00
ToStringVector.tests.cpp Some refactorings: 2020-01-25 09:01:04 +01:00
ToStringWhich.tests.cpp Add -Wmissing-declarations to the SelfTest project 2018-07-02 17:36:13 +02:00
Tricky.tests.cpp Fix potential infinite loops in generators combined with section filter 2020-10-31 18:04:15 +01:00
VariadicMacros.tests.cpp All tests files have .tests.cpp suffix. Also moved tests out of TestMain.cpp and moved up a level 2017-11-13 16:03:27 +00:00