Merge #16978: test: Seed test RNG context for each test case, print seed

fae43a97ca test: Seed test RNG context for each test case, print seed (MarcoFalke)

Pull request description:

  Debugging failing unit tests is hard if the failure is non-deterministic and the seed is not known.

  Fix that by printing the seed and making it possible to set the seed from outside.

ACKs for top commit:
  davereikher:
    Tested ACK fae43a97ca

Tree-SHA512: 33d848dd1f4180d3664ecf60e9810c2a93590c05276b2c46b1e4fe6e376b45916a46b90c803bb602750ab666da3a05ce499e550024685a90b8cc38fab6667cb8
This commit is contained in:
MarcoFalke
2019-11-07 10:18:29 -05:00
9 changed files with 46 additions and 15 deletions

View File

@@ -1106,7 +1106,7 @@ BOOST_AUTO_TEST_CASE(util_IsHexNumber)
BOOST_AUTO_TEST_CASE(util_seed_insecure_rand)
{
SeedInsecureRand(true);
SeedInsecureRand(SeedRand::ZEROS);
for (int mod=2;mod<11;mod++)
{
int mask = 1;