zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 13c405127d18334bb1b6c9e2011d2daa744bc7c4 (tree)
parent 51682717d773aa4bdee89bc67cab08dc9b4bcc15
Author: Jakub Konka <kubkon@jakubkonka.com>
Date:   Sat, 30 May 2020 23:17:55 +0200

Fix typo in PackedIntArray tests

Both `PackedIntArray` and `PackedIntSlice` tests defined `max_bits`
but didn't use it in the predicate in the inline while loop.

Diffstat:
Mlib/std/packed_int_array.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/std/packed_int_array.zig b/lib/std/packed_int_array.zig @@ -322,7 +322,7 @@ test "PackedIntArray" { const int_count = 19; comptime var bits = 0; - inline while (bits <= 256) : (bits += 1) { + inline while (bits <= max_bits) : (bits += 1) { //alternate unsigned and signed const even = bits % 2 == 0; const I = std.meta.Int(even, bits); @@ -372,7 +372,7 @@ test "PackedIntSlice" { var buffer: [total_bytes]u8 = undefined; comptime var bits = 0; - inline while (bits <= 256) : (bits += 1) { + inline while (bits <= max_bits) : (bits += 1) { //alternate unsigned and signed const even = bits % 2 == 0; const I = std.meta.Int(even, bits);