|
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.
Im not 100% familiar with the boost random value generators, am I missing something? Or should the boost::minstd_rand be instantiated outside the loop?
Im happy to add this as a boost bug if my understanding is correct
Thanks,
Chris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk