seed random generator to make tests reproducable

This commit is contained in:
ZappoMan 2014-06-25 11:14:15 -07:00
parent 47c0e2266f
commit 9e0f010edd

View file

@ -238,6 +238,9 @@ void ModelTests::modelTreeTests(bool verbose) {
} }
{ {
// seed the random number generator so that our tests are reproducible
srand(0xFEEDBEEF);
testsTaken++; testsTaken++;
const int TEST_ITERATIONS = 10000; const int TEST_ITERATIONS = 10000;
QString testName = "Performance - add model to tree " + QString::number(TEST_ITERATIONS) + " times"; QString testName = "Performance - add model to tree " + QString::number(TEST_ITERATIONS) + " times";