Use test's random generator

This removes the `create` calls when a test was only setting up a
generator, and it replaces them with `reset` when run in a loop.
This commit is contained in:
Feoramund
2024-06-15 15:49:05 -04:00
parent 5dfd303fd1
commit 1a52cf1f1c
5 changed files with 16 additions and 38 deletions
+1 -2
View File
@@ -53,8 +53,7 @@ test_xxhash_zero_streamed_random_updates :: proc(t: ^testing.T) {
testing.expect(t, xxh3_128_err == nil, "Problem initializing XXH3_128 state")
// XXH3_128_update
random_seed := rand.create(t.seed)
context.random_generator = rand.default_random_generator(&random_seed)
rand.reset(t.seed)
for len(b) > 0 {
update_size := min(len(b), rand.int_max(8192))
if update_size > 4096 {