mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 05:59:24 +00:00
Turn RunTests into TestRunOrder enum class
This commit is contained in:
parent
60cc4c293d
commit
b0531404e4
6 changed files with 16 additions and 16 deletions
|
@ -46,15 +46,15 @@ namespace {
|
|||
|
||||
std::vector<TestCaseHandle> sortTests( IConfig const& config, std::vector<TestCaseHandle> const& unsortedTestCases ) {
|
||||
switch (config.runOrder()) {
|
||||
case RunTests::InDeclarationOrder:
|
||||
case TestRunOrder::Declared:
|
||||
return unsortedTestCases;
|
||||
|
||||
case RunTests::InLexicographicalOrder: {
|
||||
case TestRunOrder::LexicographicallySorted: {
|
||||
std::vector<TestCaseHandle> sorted = unsortedTestCases;
|
||||
std::sort(sorted.begin(), sorted.end());
|
||||
return sorted;
|
||||
}
|
||||
case RunTests::InRandomOrder: {
|
||||
case TestRunOrder::Randomized: {
|
||||
seedRng(config);
|
||||
HashTest h(rng());
|
||||
std::vector<std::pair<uint64_t, TestCaseHandle>> indexed_tests;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue