Opened 8 years ago

Last modified 8 years ago

#9945 new Bugs

Regression test using random number generator incorrectly

Reported by: chris.cooper@… Owned by: No-Maintainer
Milestone: To Be Determined Component: utility
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

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

The randomizer must be instantiated outside the loop.

Change History (1)

comment:1 by Niklas Angare <li51ckf02@…>, 8 years ago

Component: Regression Testingutility
Owner: changed from René Rivera to No-Maintainer
Note: See TracTickets for help on using tickets.