Zig Version
0.10.0-dev.1120+0ea51f7f4
Steps to Reproduce
- Paste this code:
conststd=@import("std");
test"oob!" {
varfoo: [123]u8=undefined;
foo[std.rand.DefaultPrng.init(100).random().uintAtMost(usize, 99999) +123] =123;
}zig test file.zig
Expected Behavior
Something more like this:
test"oob!"failedoob.zig:4:52|test"oob!" {
3|varfoo: [123]u8=undefined; 4|foo[std.rand.DefaultPrng.init(100).random().uintAtMost(usize, 99999) +123] =123;
^panic: indexoutofbounds>index: 1209348>bounds: 122Stacktrace:
test"oob!"|oob.zig:4:51testfailure0testspassed (0expectations)
1ms elapsedActual Behavior
❯ zig test /Users/jarred/Desktop/oob.zig
Test [1/1] test"ooob"... thread 5048573 panic: index out of bounds
error: the following testcommand crashed:
/Users/jarred/Desktop/zig-cache/o/c5163ac39be41b38c5688f3aeff793b0/test /Users/jarred/Build/zig/zig
Zig Version
0.10.0-dev.1120+0ea51f7f4
Steps to Reproduce
zig test file.zigExpected Behavior
Something more like this:
Actual Behavior