diff options
| author | Martin Hořeňovský | 2026-02-15 20:27:15 +0100 |
|---|---|---|
| committer | GitHub | 2026-02-15 20:27:15 +0100 |
| commit | 3a0cf7e75fdc571ff9ed25303fb268665f6260c0 (patch) | |
| tree | 25cd180f4419e0ef2f6fbe3664f91b548c59d8c2 /src/catch2/interfaces | |
| parent | b6c7b217d4bcb5030ce1e04180f35d02bcf5d93f (diff) | |
| download | catch3-3a0cf7e75fdc571ff9ed25303fb268665f6260c0.tar.gz | |
Support filtering on both sections and generators (#3069)
Not being able to filter generators to specific element has been regularly
causing problems. It was possible to use a dynamic section to run tests
for specific element in a generator, at least if the element had a nice
string representation, but the test case would still run once per element
in the generator.
With this change, it is possible to have the generator return only one
specific element, and do so based on the index, rather than the string
representation of the element. This enables simple debugging of tests
that fail for specific generator element.
Diffstat (limited to 'src/catch2/interfaces')
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_config.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_config.hpp b/src/catch2/interfaces/catch_interfaces_config.hpp index db4745c3..139d2c1e 100644 --- a/src/catch2/interfaces/catch_interfaces_config.hpp +++ b/src/catch2/interfaces/catch_interfaces_config.hpp @@ -62,6 +62,7 @@ namespace Catch { class TestSpec; class IStream; + struct PathFilter; class IConfig : public Detail::NonCopyable { public: @@ -87,7 +88,9 @@ namespace Catch { virtual unsigned int shardCount() const = 0; virtual unsigned int shardIndex() const = 0; virtual ColourMode defaultColourMode() const = 0; - virtual std::vector<std::string> const& getSectionsToRun() const = 0; + virtual std::vector<PathFilter> const& getPathFilters() const = 0; + virtual bool useNewFilterBehaviour() const = 0; + virtual Verbosity verbosity() const = 0; virtual bool skipBenchmarks() const = 0; |