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

@ -29,14 +29,6 @@ namespace Catch {
return line < other.line || ( line == other.line && (std::strcmp(file, other.file) < 0));
}
void seedRng( IConfig const& config ) {
if( config.rngSeed() != 0 )
std::srand( config.rngSeed() );
}
unsigned int rngSeed() {
return getCurrentContext().getConfig()->rngSeed();
}
std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) {
#ifndef __GNUG__
os << info.file << '(' << info.line << ')';