Turn RunTests into TestRunOrder enum class

This commit is contained in:
Martin Hořeňovský 2020-08-11 15:46:03 +02:00
parent 60cc4c293d
commit b0531404e4
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
6 changed files with 16 additions and 16 deletions

View file

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