diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-02-22 01:30:49 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-22 01:30:49 -0500 |
| commit | 6dc5ce931cbd208221be8588115e6d5e2fcb6eae (patch) | |
| tree | 7176ce4247ac44aad5e5b0e37dbc058e1e2723f2 /test/behavior | |
| parent | 74303a3d9591f188fb4dda96bf689c00ebbd24ca (diff) | |
| parent | 25f73224f7f9921633e67d4b5ef12c6ec10406eb (diff) | |
| download | zig-6dc5ce931cbd208221be8588115e6d5e2fcb6eae.tar.gz zig-6dc5ce931cbd208221be8588115e6d5e2fcb6eae.zip | |
Merge pull request #10959 from joachimschmidt557/stage2-aarch64
stage2 AArch64: misc improvements
Diffstat (limited to 'test/behavior')
| -rw-r--r-- | test/behavior/align.zig | 4 | ||||
| -rw-r--r-- | test/behavior/basic.zig | 7 | ||||
| -rw-r--r-- | test/behavior/bitreverse.zig | 1 | ||||
| -rw-r--r-- | test/behavior/bugs/1486.zig | 2 | ||||
| -rw-r--r-- | test/behavior/bugs/2006.zig | 2 | ||||
| -rw-r--r-- | test/behavior/cast.zig | 3 | ||||
| -rw-r--r-- | test/behavior/optional.zig | 1 | ||||
| -rw-r--r-- | test/behavior/slice.zig | 2 | ||||
| -rw-r--r-- | test/behavior/struct.zig | 4 |
9 files changed, 9 insertions, 17 deletions
diff --git a/test/behavior/align.zig b/test/behavior/align.zig index 22cbce8261..6a899fcdc5 100644 --- a/test/behavior/align.zig +++ b/test/behavior/align.zig @@ -27,7 +27,6 @@ test "default alignment allows unspecified in type syntax" { } test "implicitly decreasing pointer alignment" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; const a: u32 align(4) = 3; const b: u32 align(8) = 4; try expect(addUnaligned(&a, &b) == 7); @@ -38,7 +37,6 @@ fn addUnaligned(a: *align(1) const u32, b: *align(1) const u32) u32 { } test "@alignCast pointers" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; var x: u32 align(4) = 1; expectsOnly1(&x); try expect(x == 2); @@ -313,7 +311,7 @@ fn testIndex2(ptr: [*]align(4) u8, index: usize, comptime T: type) !void { } test "alignment of function with c calling convention" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; if (builtin.zig_backend == .stage1) return error.SkipZigTest; var runtime_nothing = ¬hing; diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig index 05c1f1cda3..d5081ca636 100644 --- a/test/behavior/basic.zig +++ b/test/behavior/basic.zig @@ -48,7 +48,7 @@ const g1: i32 = 1233 + 1; var g2: i32 = 0; test "global variables" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; try expect(g2 == 0); g2 = g1; try expect(g2 == 1234); @@ -327,7 +327,6 @@ const FnPtrWrapper = struct { }; test "const ptr from var variable" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; var x: u64 = undefined; @@ -611,7 +610,7 @@ test "comptime cast fn to ptr" { } test "equality compare fn ptrs" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; if (builtin.zig_backend == .stage1) return error.SkipZigTest; var a = &emptyFn; @@ -619,7 +618,7 @@ test "equality compare fn ptrs" { } test "self reference through fn ptr field" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; if (builtin.zig_backend == .stage1) return error.SkipZigTest; if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; diff --git a/test/behavior/bitreverse.zig b/test/behavior/bitreverse.zig index ff0775eb07..28980cccf3 100644 --- a/test/behavior/bitreverse.zig +++ b/test/behavior/bitreverse.zig @@ -8,7 +8,6 @@ test "@bitReverse large exotic integer" { if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // Currently failing on stage1 for big-endian targets if (builtin.zig_backend == .stage1) return error.SkipZigTest; diff --git a/test/behavior/bugs/1486.zig b/test/behavior/bugs/1486.zig index 91d5b621d2..66414025e3 100644 --- a/test/behavior/bugs/1486.zig +++ b/test/behavior/bugs/1486.zig @@ -6,7 +6,7 @@ const ptr = &global; var global: usize = 123; test "constant pointer to global variable causes runtime load" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; global = 1234; try expect(&global == ptr); try expect(ptr.* == 1234); diff --git a/test/behavior/bugs/2006.zig b/test/behavior/bugs/2006.zig index fcacb9a2c6..03cef375fe 100644 --- a/test/behavior/bugs/2006.zig +++ b/test/behavior/bugs/2006.zig @@ -6,7 +6,7 @@ const S = struct { p: *S, }; test "bug 2006" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; var a: S = undefined; a = S{ .p = undefined }; diff --git a/test/behavior/cast.zig b/test/behavior/cast.zig index 75d470b21f..f5758a3466 100644 --- a/test/behavior/cast.zig +++ b/test/behavior/cast.zig @@ -211,7 +211,6 @@ test "implicit cast from *[N]T to [*c]T" { } test "*usize to *void" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; var i = @as(usize, 0); var v = @ptrCast(*void, &i); v.* = {}; @@ -1014,7 +1013,7 @@ test "cast from array reference to fn: comptime fn ptr" { try expect(@ptrToInt(f) == @ptrToInt(&global_array)); } test "cast from array reference to fn: runtime fn ptr" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO diff --git a/test/behavior/optional.zig b/test/behavior/optional.zig index 78788d6556..71f34d0096 100644 --- a/test/behavior/optional.zig +++ b/test/behavior/optional.zig @@ -36,7 +36,6 @@ test "optional pointer to size zero struct" { } test "equality compare optional pointers" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO diff --git a/test/behavior/slice.zig b/test/behavior/slice.zig index 08ab0edf48..5123350e20 100644 --- a/test/behavior/slice.zig +++ b/test/behavior/slice.zig @@ -81,7 +81,7 @@ fn assertLenIsZero(msg: []const u8) !void { } test "access len index of sentinel-terminated slice" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO const S = struct { diff --git a/test/behavior/struct.zig b/test/behavior/struct.zig index d059cccb60..bd04868f68 100644 --- a/test/behavior/struct.zig +++ b/test/behavior/struct.zig @@ -43,7 +43,6 @@ const StructWithFields = struct { }; test "non-packed struct has fields padded out to the required alignment" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; const foo = StructWithFields{ .a = 5, .b = 1, .c = 10, .d = 2 }; @@ -67,7 +66,7 @@ const SmallStruct = struct { }; test "lower unnamed constants" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; var foo = SmallStruct{ .a = 1, .b = 255 }; try expect(foo.first() == 1); try expect(foo.second() == 255); @@ -186,7 +185,6 @@ test "store member function in variable" { } test "member functions" { - if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; const r = MemberFnRand{ .seed = 1234 }; try expect(r.getSeed() == 1234); } |
