mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-15 14:59:38 +01:00
Turn RunTests into TestRunOrder enum class
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user