authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-06 20:12:00-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-06 20:12:00-07:00
logf0fde1d9c2fcd1142ad1343dc2dd788435e743ef
tree9d903f1bcb0027e6c70545066ee25ad1bb6a18a6
parent1b610d7853b479392470d1933c81aafe70e714d4

std.leb128: disable regressed test due to LLVM 14

See #12031

1 files changed, 15 insertions(+), 0 deletions(-)

lib/std/leb128.zig+15
...@@ -1,3 +1,4 @@...@@ -1,3 +1,4 @@
1const builtin = @import("builtin");
1const std = @import("std");2const std = @import("std");
2const testing = std.testing;3const testing = std.testing;
34
...@@ -346,6 +347,13 @@ fn test_write_leb128(value: anytype) !void {...@@ -346,6 +347,13 @@ fn test_write_leb128(value: anytype) !void {
346}347}
347348
348test "serialize unsigned LEB128" {349test "serialize unsigned LEB128" {
350 if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and
351 builtin.cpu.arch == .riscv64)
352 {
353 // https://github.com/ziglang/zig/issues/12031
354 return error.SkipZigTest;
355 }
356
349 const max_bits = 18;357 const max_bits = 18;
350358
351 comptime var t = 0;359 comptime var t = 0;
...@@ -360,6 +368,13 @@ test "serialize unsigned LEB128" {...@@ -360,6 +368,13 @@ test "serialize unsigned LEB128" {
360}368}
361369
362test "serialize signed LEB128" {370test "serialize signed LEB128" {
371 if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and
372 builtin.cpu.arch == .riscv64)
373 {
374 // https://github.com/ziglang/zig/issues/12031
375 return error.SkipZigTest;
376 }
377
363 // explicitly test i0 because starting `t` at 0378 // explicitly test i0 because starting `t` at 0
364 // will break the while loop379 // will break the while loop
365 try test_write_leb128(@as(i0, 0));380 try test_write_leb128(@as(i0, 0));