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 › math › testCeilPowerOfTwoPromote Private Function testCeilPowerOfTwoPromote Doc Source Private Function std.math.testCeilPowerOfTwoPromote
fn testCeilPowerOfTwoPromote () !void File math.zig: 1246
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256 fn testCeilPowerOfTwoPromote () !void {
try testing .expectEqual (@as (u33 , 1 ), ceilPowerOfTwoPromote (u32 , 1 ));
try testing .expectEqual (@as (u33 , 2 ), ceilPowerOfTwoPromote (u32 , 2 ));
try testing .expectEqual (@as (u33 , 64 ), ceilPowerOfTwoPromote (u32 , 63 ));
try testing .expectEqual (@as (u33 , 64 ), ceilPowerOfTwoPromote (u32 , 64 ));
try testing .expectEqual (@as (u33 , 128 ), ceilPowerOfTwoPromote (u32 , 65 ));
try testing .expectEqual (@as (u6 , 8 ), ceilPowerOfTwoPromote (u5 , 7 ));
try testing .expectEqual (@as (u6 , 8 ), ceilPowerOfTwoPromote (u5 , 8 ));
try testing .expectEqual (@as (u6 , 16 ), ceilPowerOfTwoPromote (u5 , 9 ));
try testing .expectEqual (@as (u5 , 16 ), ceilPowerOfTwoPromote (u4 , 9 ));
}