|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The speed of random number generation can have a
significant impact on test execution time when
initializing large arrays of random values. The C++
random number engines and generators are much slower
than std::rand.
Thus, use C's rand() to generate pseudo-random values
within a given [min,max] range. For testing purposes,
deterministic sequences would be preferable anyway.
That is, if a particular sequence exposes a test failure,
then we can reproduce it later. Also, we seed the
pseudo-random number generator with the current time
so that the sequence is not always the same across
executions. The seed is then recorded in the test
results so that the sequence can be reproduced if
needed.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|