Class ConditionMatcher
Defined in File TestRunner.h
Class Documentation
-
class ConditionMatcher
Handles filtering of test suites and individual tests based on provided filter expressions.
Public Functions
-
void SetFilter(const optional<string> &filter_expression)
Sets the filter for test suites.
The filter expression is a comma-separated string of conditions. Each condition is a plus-separated string of texts. A text can be negated by prefixing it with a ‘^’.
For a test suite or test to match the filter, it must match at least one of the comma-separated conditions. A condition is met if the test suite’s or test’s description or name contains all the non-negated texts and none of the negated texts within that condition (separated by ‘+’).
-
bool Match(const string &raw = "", const string &as_label = "")
Checks if a given raw string or label matches the current filter.
- Parameters:
raw – The raw string to check for filter text.
as_label – The string formatted as a label (e.g., “[label]”).
-
void SetFilter(const optional<string> &filter_expression)