aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2023-08-09 13:16:27 -0700
committerMike Buland <eichlan@xagasoft.com>2023-08-09 13:16:27 -0700
commit0e965ecb16368be3a4b500ffb16fa605e773d7b7 (patch)
tree2d346438db3a71d6f1bd664aee6c4c2cbc46a4ab /src
parent743a0010e4aca0b5c5ceaba55af3415587af6cf7 (diff)
downloadlibbu++-0e965ecb16368be3a4b500ffb16fa605e773d7b7.tar.gz
libbu++-0e965ecb16368be3a4b500ffb16fa605e773d7b7.tar.bz2
libbu++-0e965ecb16368be3a4b500ffb16fa605e773d7b7.tar.xz
libbu++-0e965ecb16368be3a4b500ffb16fa605e773d7b7.zip
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!
Diffstat (limited to 'src')
-rw-r--r--src/unit/hash.unit2
-rw-r--r--src/unit/queuebuf.unit2
-rw-r--r--src/unit/synchrohash.unit2
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
131 131
132 test stress 132 test stress
133 { 133 {
134 srandom(time(NULL)); 134 srandom(12345);
135 135
136 IntStrHash hTest; 136 IntStrHash hTest;
137 IntStrHash hReUse; 137 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
42 42
43 test testAmounts 43 test testAmounts
44 { 44 {
45 srandom(time(NULL)); 45 srandom(12345);
46 Bu::QueueBuf qb; 46 Bu::QueueBuf qb;
47 Bu::String sTmp; 47 Bu::String sTmp;
48 char buf[4096]; 48 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
131 131
132 test stress 132 test stress
133 { 133 {
134 srandom(time(NULL)); 134 srandom(1234);
135 135
136 IntStrHash hTest; 136 IntStrHash hTest;
137 IntStrHash hReUse; 137 IntStrHash hReUse;