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 › bit_set › testSupersetOf Private Function testSupersetOf Doc Source Private Function std.bit_set.testSupersetOf
fn testSupersetOf (empty : anytype , full : anytype , even : anytype , odd : anytype , len : usize ) !void Params empty full even odd len : usize File bit_set.zig: 1410
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428 fn testSupersetOf (empty : anytype , full : anytype , even : anytype , odd : anytype , len : usize ) !void {
try testing .expect (full .supersetOf (full ));
try testing .expect (full .supersetOf (empty ));
try testing .expect (empty .supersetOf (empty ));
switch (len ) {
0 => {
try testing .expect (even .supersetOf (odd ));
try testing .expect (odd .supersetOf (even ));
},
1 => {
try testing .expect (even .supersetOf (odd ));
try testing .expect (!odd .supersetOf (even ));
},
else => {
try testing .expect (!even .supersetOf (odd ));
try testing .expect (!odd .supersetOf (even ));
},
}
}