diff options
| author | Martin Hořeňovský | 2020-10-22 14:20:47 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-10-31 18:04:15 +0100 |
| commit | 765ac08f0811f3a9d2cd6d3bdaa6cbe457457adc (patch) | |
| tree | d4148c03682ce5d1e255522376a7782c1bb4611c /projects/SelfTest/UsageTests/ToStringOptional.tests.cpp | |
| parent | 8dd25b041074da3fb46345024949f46b9b666cbc (diff) | |
| download | catch3-765ac08f0811f3a9d2cd6d3bdaa6cbe457457adc.tar.gz | |
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
Diffstat (limited to 'projects/SelfTest/UsageTests/ToStringOptional.tests.cpp')
0 files changed, 0 insertions, 0 deletions