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.
Zig › std/ › bit_set.zig › testSupersetOf
testSupersetOf
bit_set.testSupersetOf
fn testSupersetOf (empty : anytype , full : anytype , even : anytype , odd : anytype , len : usize ) !void
File
Code
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 ));
},
}
}