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 › Build › Step › Run › addCheck Public Function addCheck Doc Source Public Function std.Build.Step.Run.addCheck
pub fn addCheck (run : *Run , new_check : StdIo .Check ) void Params File Build/Step/Run.zig: 732
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750 pub fn addCheck (run : *Run , new_check : StdIo .Check ) void {
const b = run .step .owner ;
switch (run .stdio ) {
.infer_from_args => {
run .stdio = .{ .check = .empty };
run .stdio .check .append (b .allocator , new_check ) catch @panic ("OOM" );
},
.check => |*checks | checks .append (b .allocator , new_check ) catch @panic ("OOM" ),
else => @panic ("illegal call to addCheck: conflicting helper method calls. Suggest to directly set stdio field of Run instead" ),
}
switch (new_check ) {
.expect_stderr_snapshot ,
.expect_stdout_snapshot ,
=> |file | run .addFileInput (file ),
else => {},
}
}