Update documentation for --order

This commit is contained in:
Martin Hořeňovský 2020-04-15 16:19:54 +02:00
parent 6fbe5efc71
commit fa4a93e051
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -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