mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 19:53:28 +01:00
Update documentation for --order
This commit is contained in:
parent
6fbe5efc71
commit
fa4a93e051
@ -243,15 +243,23 @@ This option lists all available tests in a non-indented form, one on each line.
|
|||||||
|
|
||||||
Test cases are ordered one of three ways:
|
Test cases are ordered one of three ways:
|
||||||
|
|
||||||
|
|
||||||
### decl
|
### decl
|
||||||
Declaration order (this is the default order if no --order argument is provided). The order the tests were originally declared in. Note that ordering between files is not guaranteed and is implementation dependent.
|
Declaration order (this is the default order if no --order argument is provided).
|
||||||
|
Tests in the same TU are sorted using their declaration orders, different
|
||||||
|
TUs are in an implementation (linking) dependent order.
|
||||||
|
|
||||||
|
|
||||||
### lex
|
### lex
|
||||||
Lexicographically sorted. Tests are sorted, alpha-numerically, by name.
|
Lexicographic order. Tests are sorted by their name, their tags are ignored.
|
||||||
|
|
||||||
|
|
||||||
### rand
|
### rand
|
||||||
Randomly sorted. Test names are sorted using ```std::random_shuffle()```. By default the random number generator is seeded with 0 - and so the order is repeatable. To control the random seed see <a href="#rng-seed">rng-seed</a>.
|
|
||||||
|
Randomly sorted. The order is dependent on Catch2's random seed (see
|
||||||
|
[`--rng-seed`](#rng-seed)), and is subset invariant. What this means
|
||||||
|
is that as long as the random seed is fixed, running only some tests
|
||||||
|
(e.g. via tag) does not change their relative order.
|
||||||
|
|
||||||
|
|
||||||
<a id="rng-seed"></a>
|
<a id="rng-seed"></a>
|
||||||
## Specify a seed for the Random Number Generator
|
## Specify a seed for the Random Number Generator
|
||||||
|
Loading…
Reference in New Issue
Block a user