Split RNG related things into its own file

This further removes 2 function declarations from the common path
This commit is contained in:
Martin Hořeňovský 2017-08-30 15:32:44 +02:00
parent 48db47c737
commit 0673b9be35
9 changed files with 76 additions and 29 deletions

View file

@ -22,21 +22,6 @@ namespace Catch {
class TestCase;
struct IConfig;
struct RandomNumberGenerator {
using result_type = std::ptrdiff_t;
result_type operator()( result_type n ) const;
static constexpr result_type min() { return 0; }
static constexpr result_type max() { return 1000000; }
result_type operator()() const;
template<typename V>
static void shuffle( V& vector ) {
RandomNumberGenerator rng;
std::shuffle( vector.begin(), vector.end(), rng );
}
};
std::vector<TestCase> sortTests( IConfig const& config, std::vector<TestCase> const& unsortedTestCases );
bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config );