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 standard library.
std › zig › system › linux › testParser Private Function testParser Doc Source Private Function std.zig.system.linux.testParser
fn testParser (
parser : anytype ,
arch : Target .Cpu .Arch ,
expected_model : *const Target .Cpu .Model ,
input : []const u8 ,
) !void Params parser arch : Target .Cpu .Arch expected_model : *const Target .Cpu .Model input : []const u8 File zig/system/linux.zig: 412
412
413
414
415
416
417
418
419
420
421
422 fn testParser (
parser : anytype ,
arch : Target .Cpu .Arch ,
expected_model : *const Target .Cpu .Model ,
input : []const u8 ,
) !void {
var r : Io .Reader = .fixed (input );
const result = try parser .parse (arch , &r );
try testing .expectEqual (expected_model , result .?.model );
try testing .expect (expected_model .features .eql (result .?.features ));
}