| ... | @@ -1,3 +1,4 @@ | ... | @@ -1,3 +1,4 @@ |
| | 1 | const builtin = @import("builtin"); |
| 1 | const std = @import("std"); | 2 | const std = @import("std"); |
| 2 | const testing = std.testing; | 3 | const testing = std.testing; |
| 3 | | 4 | |
| ... | @@ -346,6 +347,13 @@ fn test_write_leb128(value: anytype) !void { | ... | @@ -346,6 +347,13 @@ fn test_write_leb128(value: anytype) !void { |
| 346 | } | 347 | } |
| 347 | | 348 | |
| 348 | test "serialize unsigned LEB128" { | 349 | test "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; |
| 350 | | 358 | |
| 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 | } |
| 361 | | 369 | |
| 362 | test "serialize signed LEB128" { | 370 | test "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 0 | 378 | // explicitly test i0 because starting `t` at 0 |
| 364 | // will break the while loop | 379 | // will break the while loop |
| 365 | try test_write_leb128(@as(i0, 0)); | 380 | try test_write_leb128(@as(i0, 0)); |