aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Random/ziggurat.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-07-22 16:03:11 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-07-23 11:43:12 -0700
commit33c79841832b575c2dacc7ec07ac9536798be4e3 (patch)
treec7cf048b70a09f3e365ac0d36828b4653cc6d457 /lib/std/Random/ziggurat.zig
parent6f3e9939d0389539570d4a7cad95b1e96bc8f0d4 (diff)
downloadzig-33c79841832b575c2dacc7ec07ac9536798be4e3.tar.gz
zig-33c79841832b575c2dacc7ec07ac9536798be4e3.zip
add std.testing.random_seed
closes #17609
Diffstat (limited to 'lib/std/Random/ziggurat.zig')
-rw-r--r--lib/std/Random/ziggurat.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/std/Random/ziggurat.zig b/lib/std/Random/ziggurat.zig
index 2bed6a065b..682fef07f9 100644
--- a/lib/std/Random/ziggurat.zig
+++ b/lib/std/Random/ziggurat.zig
@@ -126,7 +126,9 @@ pub fn norm_zero_case(random: Random, u: f64) f64 {
}
}
-test "normal dist sanity" {
+test "normal dist smoke test" {
+ // Hardcode 0 as the seed because it's possible a seed exists that fails
+ // this test.
var prng = Random.DefaultPrng.init(0);
const random = prng.random();