From 0e965ecb16368be3a4b500ffb16fa605e773d7b7 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 9 Aug 2023 13:16:27 -0700 Subject: Used fixed seeds where random is used in tests. It was so stupid to use random numbers in tests, generators yes, but random? the test won't fail the same way twice in a row, defeating the entire point of the test! --- src/unit/hash.unit | 2 +- src/unit/queuebuf.unit | 2 +- src/unit/synchrohash.unit | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/unit/hash.unit b/src/unit/hash.unit index 920abac..c303df9 100644 --- a/src/unit/hash.unit +++ b/src/unit/hash.unit @@ -131,7 +131,7 @@ suite Hash test stress { - srandom(time(NULL)); + srandom(12345); IntStrHash hTest; IntStrHash hReUse; diff --git a/src/unit/queuebuf.unit b/src/unit/queuebuf.unit index b628893..6942852 100644 --- a/src/unit/queuebuf.unit +++ b/src/unit/queuebuf.unit @@ -42,7 +42,7 @@ suite QueueBuf test testAmounts { - srandom(time(NULL)); + srandom(12345); Bu::QueueBuf qb; Bu::String sTmp; char buf[4096]; diff --git a/src/unit/synchrohash.unit b/src/unit/synchrohash.unit index 756f38b..eb6c387 100644 --- a/src/unit/synchrohash.unit +++ b/src/unit/synchrohash.unit @@ -131,7 +131,7 @@ suite Hash test stress { - srandom(time(NULL)); + srandom(1234); IntStrHash hTest; IntStrHash hReUse; -- cgit v1.2.3