catch2/include
John Bytheway f696ab836b Change random test shuffling technique
Previously a random test ordering was obtained by applying std::shuffle
to the tests in declaration order.  This has two problems:

- It depends on the declaration order, so the order in which the tests
  will be run will be platform-specific.
- When trying to debug accidental inter-test dependencies, it is helpful
  to be able to find a minimal subset of tests which exhibits the issue.
  However, any change to the set of tests being run will completely
  change the test ordering, making it difficult or impossible to reduce
  the set of tests being run in any reasonably efficient manner.

Therefore, change the randomization approach to resolve both these
issues.

Generate a random value based on the user-provided RNG seed.  Convert
every test case to an integer by hashing a combination of that value
with the test name.  Sort the test cases by this integer.

The test names and RNG are platform-independent, so this should be
consistent across platforms.  Also, removing one test does not change
the integer value associated with the remaining tests, so they remain in
the same order.

To hash, use the FNV-1a hash, except with the basis being our randomly
selected value rather than the fixed basis set in the algorithm.  Cannot
use std::hash, because it is important that the result be
platform-independent.
2020-04-14 12:47:36 +02:00
..
external Fix vendored dep because upstream is non-responsive 2019-04-10 20:17:25 +02:00
internal Change random test shuffling technique 2020-04-14 12:47:36 +02:00
reporters Fixed typo in "benchmark name" column width calculation. Closes #1885. 2020-03-26 10:31:35 +01:00
catch.hpp v2.11.3 2020-03-19 13:50:19 +01:00
catch_with_main.hpp Fixed catch_with_main.hpp (no longer references deleted catch_runner.hpp) 2015-12-28 15:06:04 +00:00