Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorMartin Hořeňovský2019-06-22 20:26:03 +0200
committerMartin Hořeňovský2019-10-29 14:07:18 +0100
commit4f47d1c6c1bf21e047fc4dd8a946740a2da2f673 (patch)
tree3a82692b0821ab44cf69f54f40d5e0aaa7731cb9 /docs
parent2bcf1b3db6e1a61328f1efe093d749ef40e0bbd6 (diff)
downloadcatch3-4f47d1c6c1bf21e047fc4dd8a946740a2da2f673.tar.gz
Hidden tests now require positive filter match to be selected
This also required some refactoring of how the pattern matching works. This means that the concepts of include and exclude patterns are no longer unified, with exclusion patterns working as just negation of an inclusion patterns (which led to including hidden tags by default, as they did not match the exclusion), but rather both include and exclude patterns are handled separately. The new logic is that given a filter and a test case, the test case must match _all_ include patterns and _no_ exclude patterns to be included by the filter. Furthermore, if the test case is hidden, then the filter must have at least one include pattern for the test case to be used. Closes #1184
Diffstat (limited to 'docs')
-rw-r--r--docs/deprecations.md14
-rw-r--r--docs/release-notes.md4
2 files changed, 4 insertions, 14 deletions
diff --git a/docs/deprecations.md b/docs/deprecations.md
index 2cf77279..643c73ce 100644
--- a/docs/deprecations.md
+++ b/docs/deprecations.md
@@ -27,20 +27,6 @@ will be added), which means that their failure will not fail the test,
making the `else` actually useful.
-### Change semantics of `[.]` and tag exclusion
-
-Currently, given these 2 tests
-```cpp
-TEST_CASE("A", "[.][foo]") {}
-TEST_CASE("B", "[.][bar]") {}
-```
-specifying `[foo]` as the testspec will run test "A" and specifying
-`~[foo]` will run test "B", even though it is hidden. Also, specifying
-`~[baz]` will run both tests. This behaviour is often surprising and will
-be changed so that hidden tests are included in a run only if they
-positively match a testspec.
-
-
### Console Colour API
The API for Catch2's console colour will be changed to take an extra
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 8be1bbd5..4d0527a0 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -42,6 +42,10 @@
* XmlReporter outputs a machine-parseable XML
* `TEST_CASE` description support has been removed
* If the second argument has text outside tags, the text will be ignored.
+* Hidden test cases are no longer included just because they don't match an exclusion tag
+ * Previously, a `TEST_CASE("A", "[.foo]")` would be included by asking for `~[bar]`.
+
+
### Fixes
* The `INFO` macro no longer contains superfluous semicolon (#1456)