This commit is contained in:
Martin Hořeňovský
2026-02-15 22:55:48 +01:00
parent 56024c04e4
commit 29c9844f68
12 changed files with 550 additions and 157 deletions
+2 -2
View File
@@ -365,7 +365,7 @@ There are currently two warnings implemented:
> `UnmatchedTestSpec` was introduced in Catch2 3.0.1.
> `InfiniteGenerators` was introduced in Catch2 vX.Y.Z
> `InfiniteGenerators` was introduced in Catch2 3.13.0
<a id="reporting-timings"></a>
@@ -540,7 +540,7 @@ Prints the command line arguments to stdout
<pre>-g, --generator-index &lt;index in generator&gt;</pre>
<pre>-p, --path-filter &lt;path filter spec&gt;</pre>
> The generator and generic path filtering was added in Catch2 vX.Y.Z
> The generator and generic path filtering was added in Catch2 3.13.0
These arguments allow you to run specific section(s) in a test case, or
only get specific element from a generator. All the variants form a shared
+2 -2
View File
@@ -50,7 +50,7 @@ want to keep doing so in the future, mark the mutated members as `mutable`.
### Section-only filtering with `-c/--section`
> Deprecated in Catch2 vX.Y.Z
> Deprecated in Catch2 3.13.0
Currently, if you use only `-c/--section` parameters to decide which
sections to enter, the filtering ignores generators completely. In the
@@ -63,7 +63,7 @@ means that generators are taken into account.
#### Defaulted `UntypedGeneratorBase::isFinite()`
> Deprecated in Catch2 vX.Y.Z
> Deprecated in Catch2 3.13.0
The `UntypedGeneratorBase` currently provides a default implementation
for `isFinite` that always returns `true`. This was done to keep backwards
+3 -3
View File
@@ -1,7 +1,7 @@
<a id="top"></a>
# How to run specific section/generator
> The generator and generic path filtering was added in Catch2 vX.Y.Z
> The generator and generic path filtering was added in Catch2 3.13.0
Catch2 supports picking specific path through a test case by filtering
sections and generator indices to run through. This is done by using one
@@ -33,7 +33,7 @@ things:
## Old behaviour
> The old behaviour was deprecated in Catch2 vX.Y.Z
> The old behaviour was deprecated in Catch2 3.13.0
```
-c, --section <section name>
@@ -119,7 +119,7 @@ TEST_CASE( "qux" ) {
## New behaviour
> The new behaviour was introduced in Catch2 vX.Y.Z
> The new behaviour was introduced in Catch2 3.13.0
```
-g, --generator-index <index in generator>
+4 -4
View File
@@ -132,7 +132,7 @@ a test case,
> `IteratorGenerator<T>` was introduced in Catch2 2.10.0.
> `ConcatGenerator<T>` was introduced in Catch2 X.Y.Z
> `ConcatGenerator<T>` was introduced in Catch2 3.13.0
The generators also have associated helper functions that infer their
type, making their usage much nicer. These are
@@ -159,7 +159,7 @@ type, making their usage much nicer. These are
> `range()` for floating point numbers has been introduced in Catch2 2.11.0
> `cat` has been introduced in Catch2 X.Y.Z
> `cat` has been introduced in Catch2 3.13.0
And can be used as shown in the example below to create a generator
that returns 100 odd random number:
@@ -288,9 +288,9 @@ struct IGenerator : GeneratorUntypedBase {
};
```
> `skipToNthElementImpl` was added in Catch2 vX.Y.Z
> `skipToNthElementImpl` was added in Catch2 3.13.0
> `isFinite` was added in Catch2 vX.Y.Z
> `isFinite` was added in Catch2 3.13.0
However, to be able to use your custom generator inside `GENERATE`, it
will need to be wrapped inside a `GeneratorWrapper<T>`.
+2 -2
View File
@@ -30,7 +30,7 @@ started" as the extra info.
> `UNSCOPED_INFO` was [introduced](https://github.com/catchorg/Catch2/issues/1522) in Catch2 2.7.0.
> `UNSCOPED_CAPTURE` was introduced in Catch2 X.Y.Z.
> `UNSCOPED_CAPTURE` was introduced in Catch2 3.13.0.
The `UNSCOPED_X` macros are similar to their plain `X` macro counterparts,
with two key differences:
@@ -137,7 +137,7 @@ AS `FAIL`, but does not abort the test
**UNSCOPED_CAPTURE(** _expression1_, _expression2_, ... **)**
> `UNSCOPED_CAPTURE` was introduced in Catch2 X.Y.Z.
> `UNSCOPED_CAPTURE` was introduced in Catch2 3.13.0.
Sometimes you just want to log a value of variable, or expression. For
convenience, we provide the `CAPTURE` macro, that can take a variable,
+27
View File
@@ -2,6 +2,7 @@
# Release notes
**Contents**<br>
[3.13.0](#3130)<br>
[3.12.0](#3120)<br>
[3.11.0](#3110)<br>
[3.10.0](#3100)<br>
@@ -72,6 +73,32 @@
[Even Older versions](#even-older-versions)<br>
## 3.13.0
### Fixes
* `--benchmark-samples 0` no longer hard crashes (#3056)
* The CLI validation fails instead.
* Fixed warning suppression macros being doubly defined when using Clang on Windows (#3060)
### Improvements
* Suppressed static analysis 26426 diagnostic for MSVC (#3057)
* Renamed the internal deprecation macro from `DEPRECATED` to `CATCH_DEPRECATED` to avoid conflicts (#3058)
* Added `UNSCOPED_CAPTURE` macro (#2954)
* Added `ConcatGenerator` to combine multiple separate generator into one
* The short form is `cat`
* Generators can now jump forward to nth element efficiently
* Custom generators that can jump forward efficiently should override `skipToNthElementImpl`
* Generators can declare themselves infinite
* The generator base defaults to declaring itself finite for backwards compatibility
* Custom generators should override `isFinite()` to return the proper value
* Added `--warn InfiniteGenerators` to error out on `GENERATE` being given an infinite generator
* Extended options for section filtering from CLI to include generators
* The user can specify which element from the generator to use in the test case
* See documentation for how the new filters work and how they can be specified
* `MapGenerator` only calls the mapping function if the output will be used
## 3.12.0
### Fixes