Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

fuzzAgainstOracle

parser_fuzz.fuzzAgainstOracle
fn fuzzAgainstOracle(_: void, smith: *Smith) !void

File

lib/std/zig/parser_fuzz.zig:11

Code

fn fuzzAgainstOracle(_: void, smith: *Smith) !void {
    var buffer: [1 << 14]u8 = undefined;
    const len = smith.slice(buffer[0 .. buffer.len - 1]);
    buffer[len] = 0;
    const source = buffer[0..len :0];

    checkAgainstOracle(source) catch |err| switch (err) {
        error.MaxDepth => return error.SkipZigTest,
        else => |e| return e,
    };
}