diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-01-09 10:26:28 +0100 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2026-01-09 10:26:28 +0100 |
| commit | 6972af217899f6c01e86c7e2134126678e4d4a20 (patch) | |
| tree | 58fc2e6dbed97e2d5bbf5e10581111f712292432 /test/tests.zig | |
| parent | 335aaafcff2bfa1337cb73b39e6ffd40d691be04 (diff) | |
| parent | 91f484ed47670068b9f480344a6596f986499ff1 (diff) | |
Merge pull request 'fix: use new randomness api' (#354) from itsnoctural/exercises:main into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/354
Diffstat (limited to 'test/tests.zig')
| -rw-r--r-- | test/tests.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/tests.zig b/test/tests.zig index 94cf6aa..509cb54 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -394,7 +394,11 @@ fn heal(allocator: Allocator, exercises: []const Exercise, work_path: []const u8 fn createTempPath(b: *Build) ![]const u8 { const io = b.graph.io; - const rand_int = std.crypto.random.int(u64); + const rand_int = r: { + var x: u64 = undefined; + io.random(@ptrCast(&x)); + break :r x; + }; const tmp_dir_sub_path = "tmp" ++ std.Io.Dir.path.sep_str ++ std.fmt.hex(rand_int); const result_path = b.cache_root.join(b.allocator, &.{tmp_dir_sub_path}) catch @panic("OOM"); try b.cache_root.handle.createDirPath(io, tmp_dir_sub_path); |
