mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-04 02:47:56 +00:00
Split RNG related things into its own file
This further removes 2 function declarations from the common path
This commit is contained in:
parent
48db47c737
commit
0673b9be35
9 changed files with 76 additions and 29 deletions
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue