s/testClz/testCtz/g

The test name here was likely the result of a bad copy-paste, as the
test code is actually testing for trailing zeroes, not leading zeroes.
This commit is contained in:
Daniele Cocca
2022-03-13 11:52:58 +00:00
parent 47e004d975
commit 9b5737b5a6

View File

@@ -7,11 +7,11 @@ fn ctz(x: anytype) usize {
}
test "fixed" {
try testClz();
comptime try testClz();
try testCtz();
comptime try testCtz();
}
fn testClz() !void {
fn testCtz() !void {
try expect(ctz(@as(u128, 0x40000000000000000000000000000000)) == 126);
try expect(math.rotl(u128, @as(u128, 0x40000000000000000000000000000000), @as(u8, 1)) == @as(u128, 0x80000000000000000000000000000000));
try expect(ctz(@as(u128, 0x80000000000000000000000000000000)) == 127);