diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-07-06 15:45:53 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-07-06 15:45:53 -0700 |
| commit | 4e002dde69cfe470f0f848dcf203f755b66d9f6f (patch) | |
| tree | f8c110baee579b2a381fc4b7f33b199f4016ff22 /lib/std/math.zig | |
| parent | c061b3a5726f1a6cc1a6983e067312dddda94f42 (diff) | |
| download | zig-4e002dde69cfe470f0f848dcf203f755b66d9f6f.tar.gz zig-4e002dde69cfe470f0f848dcf203f755b66d9f6f.zip | |
std: disable tests tripping LLVM assertions
see #12012
Diffstat (limited to 'lib/std/math.zig')
| -rw-r--r-- | lib/std/math.zig | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig index de77663d5b..94a7cc7e01 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -1,3 +1,4 @@ +const builtin = @import("builtin"); const std = @import("std.zig"); const assert = std.debug.assert; const mem = std.mem; @@ -506,6 +507,12 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T { } test "shl" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testing.expect(shl(u8, 0b11111111, @as(usize, 3)) == 0b11111000); try testing.expect(shl(u8, 0b11111111, @as(usize, 8)) == 0); try testing.expect(shl(u8, 0b11111111, @as(usize, 9)) == 0); @@ -546,6 +553,12 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T { } test "shr" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testing.expect(shr(u8, 0b11111111, @as(usize, 3)) == 0b00011111); try testing.expect(shr(u8, 0b11111111, @as(usize, 8)) == 0); try testing.expect(shr(u8, 0b11111111, @as(usize, 9)) == 0); @@ -578,6 +591,12 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T { } test "rotr" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testing.expect(rotr(u8, 0b00000001, @as(usize, 0)) == 0b00000001); try testing.expect(rotr(u8, 0b00000001, @as(usize, 9)) == 0b10000000); try testing.expect(rotr(u8, 0b00000001, @as(usize, 8)) == 0b00000001); @@ -606,6 +625,12 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T { } test "rotl" { + if ((builtin.zig_backend == .stage1 or builtin.zig_backend == .stage2_llvm) and + builtin.cpu.arch == .aarch64) + { + // https://github.com/ziglang/zig/issues/12012 + return error.SkipZigTest; + } try testing.expect(rotl(u8, 0b00000001, @as(usize, 0)) == 0b00000001); try testing.expect(rotl(u8, 0b00000001, @as(usize, 9)) == 0b00000010); try testing.expect(rotl(u8, 0b00000001, @as(usize, 8)) == 0b00000001); |
