Boost logo

Boost :

Subject: [boost] Strange use of random values in regression test ...
From: Chris Cooper (chris.cooper_at_[hidden])
Date: 2014-04-21 12:55:36

The test_main() of libs/utility/operators_test.cpp loops 1000 times, running a variety of tests on random values. However, since the randomizer (boost::minstd_rand) is instantiated inside the loop, it appears that the randomizer is re-seeded for each loop, meaning it runs the test 1000x with the exact same values each time.

I’m not 100% familiar with the boost random value generators, am I missing something? Or should the boost::minstd_rand be instantiated outside the loop?

I’m happy to add this as a boost bug if my understanding is correct …


Boost list run by bdawes at, gregod at, cpdaniel at, john at