diff options
| author | Martin Hořeňovský | 2020-10-22 14:20:47 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-10-23 21:21:15 +0200 |
| commit | 4c8454b5ecfc744a85cac57cf96b8de078e26db5 (patch) | |
| tree | 7d33dd78d720311ebca196b714f80d484160af92 /tests/TestScripts/ConfigureTestsCommon.py | |
| parent | 8878f90323f7229b391f18e467113cb654fbdc06 (diff) | |
| download | catch3-4c8454b5ecfc744a85cac57cf96b8de078e26db5.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 'tests/TestScripts/ConfigureTestsCommon.py')
0 files changed, 0 insertions, 0 deletions