| author | |
| committer | |
| log | 9115f8838672021655f473ba44f33dcaf90b8371 |
| tree | f9978ce08893a58cb61c3a15025b1166cb1a308f |
| parent | 88d2961df475806a73af0f2eb4e4076159dc7f61 |
tested with `-target spirv64-vulkan` and `-mcpu vulkan_v1_2+float16+variable_pointers+float64+int64`47 files changed, 284 insertions(+), 2 deletions(-)
test/behavior/abs.zig+1| ... | @@ -54,6 +54,7 @@ test "@abs signed C ABI integers" { | ... | @@ -54,6 +54,7 @@ test "@abs signed C ABI integers" { |
| 54 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 54 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 55 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 55 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 56 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO | 56 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO |
| 57 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 57 | 58 | ||
| 58 | const S = struct { | 59 | const S = struct { |
| 59 | fn doTheTest() !void { | 60 | fn doTheTest() !void { |
test/behavior/align.zig+8| ... | @@ -7,6 +7,8 @@ const assert = std.debug.assert; | ... | @@ -7,6 +7,8 @@ const assert = std.debug.assert; |
| 7 | var foo: u8 align(4) = 100; | 7 | var foo: u8 align(4) = 100; |
| 8 | 8 | ||
| 9 | test "global variable alignment" { | 9 | test "global variable alignment" { |
| 10 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 11 | |||
| 10 | comptime assert(@typeInfo(@TypeOf(&foo)).pointer.attrs.@"align" == 4); | 12 | comptime assert(@typeInfo(@TypeOf(&foo)).pointer.attrs.@"align" == 4); |
| 11 | comptime assert(@TypeOf(&foo) == *align(4) u8); | 13 | comptime assert(@TypeOf(&foo) == *align(4) u8); |
| 12 | { | 14 | { |
| ... | @@ -16,6 +18,8 @@ test "global variable alignment" { | ... | @@ -16,6 +18,8 @@ test "global variable alignment" { |
| 16 | } | 18 | } |
| 17 | 19 | ||
| 18 | test "large abi alignment of global" { | 20 | test "large abi alignment of global" { |
| 21 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 22 | |||
| 19 | const S = struct { | 23 | const S = struct { |
| 20 | var global: @This() = undefined; | 24 | var global: @This() = undefined; |
| 21 | x: u64 align(64), | 25 | x: u64 align(64), |
| ... | @@ -51,6 +55,8 @@ test "slicing array of length 1 can not assume runtime index is always zero" { | ... | @@ -51,6 +55,8 @@ test "slicing array of length 1 can not assume runtime index is always zero" { |
| 51 | } | 55 | } |
| 52 | 56 | ||
| 53 | test "implicitly-aligned pointer is coercible to equivalent explicitly-aligned pointer" { | 57 | test "implicitly-aligned pointer is coercible to equivalent explicitly-aligned pointer" { |
| 58 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 59 | |||
| 54 | const A = *u32; | 60 | const A = *u32; |
| 55 | const B = *align(@alignOf(u32)) u32; | 61 | const B = *align(@alignOf(u32)) u32; |
| 56 | 62 | ||
| ... | @@ -83,6 +89,8 @@ test "implicitly-aligned pointer is coercible to equivalent explicitly-aligned p | ... | @@ -83,6 +89,8 @@ test "implicitly-aligned pointer is coercible to equivalent explicitly-aligned p |
| 83 | } | 89 | } |
| 84 | 90 | ||
| 85 | test "implicitly decreasing pointer alignment" { | 91 | test "implicitly decreasing pointer alignment" { |
| 92 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 93 | |||
| 86 | const a: u32 align(4) = 3; | 94 | const a: u32 align(4) = 3; |
| 87 | const b: u32 align(8) = 4; | 95 | const b: u32 align(8) = 4; |
| 88 | try expect(addUnaligned(&a, &b) == 7); | 96 | try expect(addUnaligned(&a, &b) == 7); |
test/behavior/array.zig+12| ... | @@ -7,6 +7,7 @@ const expect = testing.expect; | ... | @@ -7,6 +7,7 @@ const expect = testing.expect; |
| 7 | const expectEqual = testing.expectEqual; | 7 | const expectEqual = testing.expectEqual; |
| 8 | 8 | ||
| 9 | test "array to slice" { | 9 | test "array to slice" { |
| 10 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 10 | const a: u32 align(4) = 3; | 11 | const a: u32 align(4) = 3; |
| 11 | const b: u32 align(8) = 4; | 12 | const b: u32 align(8) = 4; |
| 12 | const a_slice: []align(1) const u32 = @as(*const [1]u32, &a)[0..]; | 13 | const a_slice: []align(1) const u32 = @as(*const [1]u32, &a)[0..]; |
| ... | @@ -21,6 +22,7 @@ test "array to slice" { | ... | @@ -21,6 +22,7 @@ test "array to slice" { |
| 21 | test "arrays" { | 22 | test "arrays" { |
| 22 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 23 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 23 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 24 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 25 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 24 | 26 | ||
| 25 | var array: [5]u32 = undefined; | 27 | var array: [5]u32 = undefined; |
| 26 | 28 | ||
| ... | @@ -259,6 +261,7 @@ fn doSomeMangling(array: *[4]u8) void { | ... | @@ -259,6 +261,7 @@ fn doSomeMangling(array: *[4]u8) void { |
| 259 | 261 | ||
| 260 | test "implicit cast zero sized array ptr to slice" { | 262 | test "implicit cast zero sized array ptr to slice" { |
| 261 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 263 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 264 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 262 | 265 | ||
| 263 | { | 266 | { |
| 264 | var b = "".*; | 267 | var b = "".*; |
| ... | @@ -969,6 +972,7 @@ test "runtime index of array of zero-bit values" { | ... | @@ -969,6 +972,7 @@ test "runtime index of array of zero-bit values" { |
| 969 | } | 972 | } |
| 970 | 973 | ||
| 971 | test "@splat array" { | 974 | test "@splat array" { |
| 975 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 972 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 976 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 973 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 977 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 974 | 978 | ||
| ... | @@ -1036,22 +1040,30 @@ test "@splat zero-length array" { | ... | @@ -1036,22 +1040,30 @@ test "@splat zero-length array" { |
| 1036 | } | 1040 | } |
| 1037 | 1041 | ||
| 1038 | test "initialize slice with reference to empty array initializer" { | 1042 | test "initialize slice with reference to empty array initializer" { |
| 1043 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1044 | |||
| 1039 | const a: []const u8 = &.{}; | 1045 | const a: []const u8 = &.{}; |
| 1040 | comptime assert(a.len == 0); | 1046 | comptime assert(a.len == 0); |
| 1041 | } | 1047 | } |
| 1042 | 1048 | ||
| 1043 | test "initialize many-pointer with reference to empty array initializer" { | 1049 | test "initialize many-pointer with reference to empty array initializer" { |
| 1050 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1051 | |||
| 1044 | const a: [*]const u8 = &.{}; | 1052 | const a: [*]const u8 = &.{}; |
| 1045 | _ = a; // nothing meaningful to test; points to zero bits | 1053 | _ = a; // nothing meaningful to test; points to zero bits |
| 1046 | } | 1054 | } |
| 1047 | 1055 | ||
| 1048 | test "initialize sentinel-terminated slice with reference to empty array initializer" { | 1056 | test "initialize sentinel-terminated slice with reference to empty array initializer" { |
| 1057 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1058 | |||
| 1049 | const a: [:0]const u8 = &.{}; | 1059 | const a: [:0]const u8 = &.{}; |
| 1050 | comptime assert(a.len == 0); | 1060 | comptime assert(a.len == 0); |
| 1051 | comptime assert(a[0] == 0); | 1061 | comptime assert(a[0] == 0); |
| 1052 | } | 1062 | } |
| 1053 | 1063 | ||
| 1054 | test "initialize sentinel-terminated many-pointer with reference to empty array initializer" { | 1064 | test "initialize sentinel-terminated many-pointer with reference to empty array initializer" { |
| 1065 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1066 | |||
| 1055 | const a: [*:0]const u8 = &.{}; | 1067 | const a: [*:0]const u8 = &.{}; |
| 1056 | comptime assert(a[0] == 0); | 1068 | comptime assert(a[0] == 0); |
| 1057 | } | 1069 | } |
test/behavior/basic.zig+7| ... | @@ -305,6 +305,7 @@ test "compile time global reinterpret" { | ... | @@ -305,6 +305,7 @@ test "compile time global reinterpret" { |
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | test "cast undefined" { | 307 | test "cast undefined" { |
| 308 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 308 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 309 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 309 | 310 | ||
| 310 | const array: [100]u8 = undefined; | 311 | const array: [100]u8 = undefined; |
| ... | @@ -640,6 +641,7 @@ fn emptyFn() void {} | ... | @@ -640,6 +641,7 @@ fn emptyFn() void {} |
| 640 | 641 | ||
| 641 | const addr1 = @as(*const u8, @ptrCast(&emptyFn)); | 642 | const addr1 = @as(*const u8, @ptrCast(&emptyFn)); |
| 642 | test "comptime cast fn to ptr" { | 643 | test "comptime cast fn to ptr" { |
| 644 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 643 | const addr2 = @as(*const u8, @ptrCast(&emptyFn)); | 645 | const addr2 = @as(*const u8, @ptrCast(&emptyFn)); |
| 644 | comptime assert(addr1 == addr2); | 646 | comptime assert(addr1 == addr2); |
| 645 | } | 647 | } |
| ... | @@ -918,6 +920,7 @@ test "labeled block with runtime branch forwards its result location type to bre | ... | @@ -918,6 +920,7 @@ test "labeled block with runtime branch forwards its result location type to bre |
| 918 | 920 | ||
| 919 | test "try in labeled block doesn't cast to wrong type" { | 921 | test "try in labeled block doesn't cast to wrong type" { |
| 920 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 922 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 923 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 921 | 924 | ||
| 922 | const S = struct { | 925 | const S = struct { |
| 923 | a: u32, | 926 | a: u32, |
| ... | @@ -1278,6 +1281,7 @@ test "@Int returned from block" { | ... | @@ -1278,6 +1281,7 @@ test "@Int returned from block" { |
| 1278 | } | 1281 | } |
| 1279 | 1282 | ||
| 1280 | test "comptime variable initialized with addresses of literals" { | 1283 | test "comptime variable initialized with addresses of literals" { |
| 1284 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1281 | comptime var st = .{ | 1285 | comptime var st = .{ |
| 1282 | .foo = &1, | 1286 | .foo = &1, |
| 1283 | .bar = &2, | 1287 | .bar = &2, |
| ... | @@ -1327,6 +1331,8 @@ test "proper value is returned from labeled block" { | ... | @@ -1327,6 +1331,8 @@ test "proper value is returned from labeled block" { |
| 1327 | } | 1331 | } |
| 1328 | 1332 | ||
| 1329 | test "const inferred array of slices" { | 1333 | test "const inferred array of slices" { |
| 1334 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1335 | |||
| 1330 | const T = struct { v: bool }; | 1336 | const T = struct { v: bool }; |
| 1331 | 1337 | ||
| 1332 | const decls = [_][]const T{ | 1338 | const decls = [_][]const T{ |
| ... | @@ -1339,6 +1345,7 @@ test "const inferred array of slices" { | ... | @@ -1339,6 +1345,7 @@ test "const inferred array of slices" { |
| 1339 | 1345 | ||
| 1340 | test "var inferred array of slices" { | 1346 | test "var inferred array of slices" { |
| 1341 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1347 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1348 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1342 | 1349 | ||
| 1343 | const T = struct { v: bool }; | 1350 | const T = struct { v: bool }; |
| 1344 | 1351 |
test/behavior/bitcast.zig+4| ... | @@ -162,6 +162,7 @@ test "@bitCast packed structs at runtime and comptime" { | ... | @@ -162,6 +162,7 @@ test "@bitCast packed structs at runtime and comptime" { |
| 162 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 162 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 163 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 163 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 164 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 164 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 165 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 165 | 166 | ||
| 166 | const Full = packed struct { | 167 | const Full = packed struct { |
| 167 | number: u16, | 168 | number: u16, |
| ... | @@ -222,6 +223,7 @@ test "bitcast packed struct to integer and back" { | ... | @@ -222,6 +223,7 @@ test "bitcast packed struct to integer and back" { |
| 222 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 223 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 223 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 224 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 224 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 225 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 226 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 225 | 227 | ||
| 226 | const LevelUpMove = packed struct { | 228 | const LevelUpMove = packed struct { |
| 227 | move_id: u9, | 229 | move_id: u9, |
| ... | @@ -555,6 +557,7 @@ test "@bitCast of extern struct containing pointer" { | ... | @@ -555,6 +557,7 @@ test "@bitCast of extern struct containing pointer" { |
| 555 | 557 | ||
| 556 | test "@bitCast of extern struct to float" { | 558 | test "@bitCast of extern struct to float" { |
| 557 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 559 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 560 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 558 | 561 | ||
| 559 | const S = struct { | 562 | const S = struct { |
| 560 | const S = extern struct { | 563 | const S = extern struct { |
| ... | @@ -575,6 +578,7 @@ test "@bitCast of extern struct to float" { | ... | @@ -575,6 +578,7 @@ test "@bitCast of extern struct to float" { |
| 575 | 578 | ||
| 576 | test "@bitCast of float to extern struct" { | 579 | test "@bitCast of float to extern struct" { |
| 577 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 580 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 581 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 578 | 582 | ||
| 579 | const S = struct { | 583 | const S = struct { |
| 580 | const S = extern struct { | 584 | const S = extern struct { |
test/behavior/call.zig+2| ... | @@ -408,6 +408,7 @@ test "recursive inline call with comptime known argument" { | ... | @@ -408,6 +408,7 @@ test "recursive inline call with comptime known argument" { |
| 408 | 408 | ||
| 409 | test "inline while with @call" { | 409 | test "inline while with @call" { |
| 410 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 410 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 411 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 411 | 412 | ||
| 412 | const S = struct { | 413 | const S = struct { |
| 413 | fn inc(a: *u32) void { | 414 | fn inc(a: *u32) void { |
| ... | @@ -735,6 +736,7 @@ test "tail call function pointer" { | ... | @@ -735,6 +736,7 @@ test "tail call function pointer" { |
| 735 | test "tail call with potentially extended types" { | 736 | test "tail call with potentially extended types" { |
| 736 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 737 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 737 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 738 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 739 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 738 | 740 | ||
| 739 | if (builtin.zig_backend == .stage2_llvm or builtin.zig_backend == .stage2_c) { | 741 | if (builtin.zig_backend == .stage2_llvm or builtin.zig_backend == .stage2_c) { |
| 740 | if (builtin.cpu.arch.isMIPS() or builtin.cpu.arch.isPowerPC() or builtin.cpu.arch.isWasm()) { | 742 | if (builtin.cpu.arch.isMIPS() or builtin.cpu.arch.isPowerPC() or builtin.cpu.arch.isWasm()) { |
test/behavior/cast.zig+25| ... | @@ -103,6 +103,7 @@ test "comptime_int @floatFromInt" { | ... | @@ -103,6 +103,7 @@ test "comptime_int @floatFromInt" { |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | test "@floatFromInt" { | 105 | test "@floatFromInt" { |
| 106 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 106 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 107 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 107 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 108 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 108 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 109 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -131,6 +132,7 @@ fn testIntFromFloat(comptime F: type, f: F, comptime I: type, i: I) !void { | ... | @@ -131,6 +132,7 @@ fn testIntFromFloat(comptime F: type, f: F, comptime I: type, i: I) !void { |
| 131 | } | 132 | } |
| 132 | 133 | ||
| 133 | test "@intFromFloat > 128 bits" { | 134 | test "@intFromFloat > 128 bits" { |
| 135 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 134 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 136 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 135 | if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; | 137 | if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; |
| 136 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 138 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| ... | @@ -156,6 +158,7 @@ fn testFloatFromInt(comptime I: type, i: I, comptime F: type, expected: F) !void | ... | @@ -156,6 +158,7 @@ fn testFloatFromInt(comptime I: type, i: I, comptime F: type, expected: F) !void |
| 156 | } | 158 | } |
| 157 | 159 | ||
| 158 | test "@floatFromInt > 128 bits" { | 160 | test "@floatFromInt > 128 bits" { |
| 161 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 159 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 162 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 160 | if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; | 163 | if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; |
| 161 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 164 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| ... | @@ -216,6 +219,8 @@ test "@floatFromInt(f80)" { | ... | @@ -216,6 +219,8 @@ test "@floatFromInt(f80)" { |
| 216 | } | 219 | } |
| 217 | 220 | ||
| 218 | test "type coercion from int to float" { | 221 | test "type coercion from int to float" { |
| 222 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 223 | |||
| 219 | const check = struct { | 224 | const check = struct { |
| 220 | // Check that an integer value can be coerced to a float type and | 225 | // Check that an integer value can be coerced to a float type and |
| 221 | // then converted back to the original value without rounding issues. | 226 | // then converted back to the original value without rounding issues. |
| ... | @@ -539,6 +544,8 @@ test "return u8 coercing into ?u32 return type" { | ... | @@ -539,6 +544,8 @@ test "return u8 coercing into ?u32 return type" { |
| 539 | } | 544 | } |
| 540 | 545 | ||
| 541 | test "cast from ?[*]T to ??[*]T" { | 546 | test "cast from ?[*]T to ??[*]T" { |
| 547 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 548 | |||
| 542 | const a: ??[*]u8 = @as(?[*]u8, null); | 549 | const a: ??[*]u8 = @as(?[*]u8, null); |
| 543 | try expect(a != null and a.? == null); | 550 | try expect(a != null and a.? == null); |
| 544 | } | 551 | } |
| ... | @@ -597,6 +604,7 @@ fn testPeerResolveArrayConstSlice(b: bool) !void { | ... | @@ -597,6 +604,7 @@ fn testPeerResolveArrayConstSlice(b: bool) !void { |
| 597 | } | 604 | } |
| 598 | 605 | ||
| 599 | test "implicitly cast from T to anyerror!?T" { | 606 | test "implicitly cast from T to anyerror!?T" { |
| 607 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 600 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 608 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 601 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 609 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 602 | 610 | ||
| ... | @@ -622,6 +630,7 @@ fn castToOptionalTypeError(z: i32) !void { | ... | @@ -622,6 +630,7 @@ fn castToOptionalTypeError(z: i32) !void { |
| 622 | } | 630 | } |
| 623 | 631 | ||
| 624 | test "implicitly cast from [0]T to anyerror![]T" { | 632 | test "implicitly cast from [0]T to anyerror![]T" { |
| 633 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 625 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 634 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 626 | 635 | ||
| 627 | try testCastZeroArrayToErrSliceMut(); | 636 | try testCastZeroArrayToErrSliceMut(); |
| ... | @@ -1420,6 +1429,7 @@ test "comptime float casts" { | ... | @@ -1420,6 +1429,7 @@ test "comptime float casts" { |
| 1420 | } | 1429 | } |
| 1421 | 1430 | ||
| 1422 | test "pointer reinterpret const float to int" { | 1431 | test "pointer reinterpret const float to int" { |
| 1432 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1423 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1433 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1424 | 1434 | ||
| 1425 | // The hex representation is 0x3fe3333333333303. | 1435 | // The hex representation is 0x3fe3333333333303. |
| ... | @@ -1613,6 +1623,7 @@ fn incrementVoidPtrValue(value: ?*anyopaque) void { | ... | @@ -1613,6 +1623,7 @@ fn incrementVoidPtrValue(value: ?*anyopaque) void { |
| 1613 | } | 1623 | } |
| 1614 | 1624 | ||
| 1615 | test "implicit cast *[0]T to E![]const u8" { | 1625 | test "implicit cast *[0]T to E![]const u8" { |
| 1626 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1616 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1627 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1617 | 1628 | ||
| 1618 | var x = @as(anyerror![]const u8, &[0]u8{}); | 1629 | var x = @as(anyerror![]const u8, &[0]u8{}); |
| ... | @@ -1807,6 +1818,7 @@ test "cast compatible optional types" { | ... | @@ -1807,6 +1818,7 @@ test "cast compatible optional types" { |
| 1807 | } | 1818 | } |
| 1808 | 1819 | ||
| 1809 | test "coerce undefined single-item pointer of array to error union of slice" { | 1820 | test "coerce undefined single-item pointer of array to error union of slice" { |
| 1821 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1810 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1822 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1811 | 1823 | ||
| 1812 | const a = @as([*]u8, undefined)[0..0]; | 1824 | const a = @as([*]u8, undefined)[0..0]; |
| ... | @@ -1817,6 +1829,7 @@ test "coerce undefined single-item pointer of array to error union of slice" { | ... | @@ -1817,6 +1829,7 @@ test "coerce undefined single-item pointer of array to error union of slice" { |
| 1817 | } | 1829 | } |
| 1818 | 1830 | ||
| 1819 | test "pointer to empty struct literal to mutable slice" { | 1831 | test "pointer to empty struct literal to mutable slice" { |
| 1832 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1820 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1833 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1821 | 1834 | ||
| 1822 | var x: []i32 = &.{}; | 1835 | var x: []i32 = &.{}; |
| ... | @@ -1970,6 +1983,7 @@ test "peer type resolution forms error union" { | ... | @@ -1970,6 +1983,7 @@ test "peer type resolution forms error union" { |
| 1970 | } | 1983 | } |
| 1971 | 1984 | ||
| 1972 | test "@constCast without a result location" { | 1985 | test "@constCast without a result location" { |
| 1986 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1973 | const x: i32 = 1234; | 1987 | const x: i32 = 1234; |
| 1974 | const y = @constCast(&x); | 1988 | const y = @constCast(&x); |
| 1975 | try expect(@TypeOf(y) == *i32); | 1989 | try expect(@TypeOf(y) == *i32); |
| ... | @@ -1977,6 +1991,7 @@ test "@constCast without a result location" { | ... | @@ -1977,6 +1991,7 @@ test "@constCast without a result location" { |
| 1977 | } | 1991 | } |
| 1978 | 1992 | ||
| 1979 | test "@constCast optional" { | 1993 | test "@constCast optional" { |
| 1994 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1980 | const x: u8 = 10; | 1995 | const x: u8 = 10; |
| 1981 | const m: ?*const u8 = &x; | 1996 | const m: ?*const u8 = &x; |
| 1982 | const p = @constCast(m); | 1997 | const p = @constCast(m); |
| ... | @@ -2053,6 +2068,7 @@ test "peer type resolution: float and comptime-known fixed-width integer" { | ... | @@ -2053,6 +2068,7 @@ test "peer type resolution: float and comptime-known fixed-width integer" { |
| 2053 | } | 2068 | } |
| 2054 | 2069 | ||
| 2055 | test "peer type resolution: float and runtime-known fixed-width integer" { | 2070 | test "peer type resolution: float and runtime-known fixed-width integer" { |
| 2071 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2056 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2072 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2057 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2073 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 2058 | 2074 | ||
| ... | @@ -2163,6 +2179,7 @@ test "peer type resolution: array and vector with same child type" { | ... | @@ -2163,6 +2179,7 @@ test "peer type resolution: array and vector with same child type" { |
| 2163 | } | 2179 | } |
| 2164 | 2180 | ||
| 2165 | test "peer type resolution: array with smaller child type and vector with larger child type" { | 2181 | test "peer type resolution: array with smaller child type and vector with larger child type" { |
| 2182 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2166 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 2183 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 2167 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2184 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2168 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2185 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -2343,6 +2360,7 @@ test "peer type resolution: array and tuple" { | ... | @@ -2343,6 +2360,7 @@ test "peer type resolution: array and tuple" { |
| 2343 | } | 2360 | } |
| 2344 | 2361 | ||
| 2345 | test "peer type resolution: vector and tuple" { | 2362 | test "peer type resolution: vector and tuple" { |
| 2363 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2346 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 2364 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 2347 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2365 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2348 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2366 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -2734,6 +2752,7 @@ test "cast builtins can wrap result in optional" { | ... | @@ -2734,6 +2752,7 @@ test "cast builtins can wrap result in optional" { |
| 2734 | } | 2752 | } |
| 2735 | 2753 | ||
| 2736 | test "cast builtins can wrap result in error union" { | 2754 | test "cast builtins can wrap result in error union" { |
| 2755 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2737 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2756 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2738 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2757 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 2739 | 2758 | ||
| ... | @@ -2809,6 +2828,7 @@ test "cast builtins can wrap result in error union and optional" { | ... | @@ -2809,6 +2828,7 @@ test "cast builtins can wrap result in error union and optional" { |
| 2809 | } | 2828 | } |
| 2810 | 2829 | ||
| 2811 | test "@floatCast on vector" { | 2830 | test "@floatCast on vector" { |
| 2831 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2812 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 2832 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 2813 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2833 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2814 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2834 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -2897,6 +2917,7 @@ test "@intFromPtr on vector" { | ... | @@ -2897,6 +2917,7 @@ test "@intFromPtr on vector" { |
| 2897 | } | 2917 | } |
| 2898 | 2918 | ||
| 2899 | test "@floatFromInt on vector" { | 2919 | test "@floatFromInt on vector" { |
| 2920 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2900 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 2921 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 2901 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2922 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2902 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2923 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -2916,6 +2937,7 @@ test "@floatFromInt on vector" { | ... | @@ -2916,6 +2937,7 @@ test "@floatFromInt on vector" { |
| 2916 | } | 2937 | } |
| 2917 | 2938 | ||
| 2918 | test "@intFromFloat on vector" { | 2939 | test "@intFromFloat on vector" { |
| 2940 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2919 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 2941 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 2920 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2942 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2921 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2943 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -2935,6 +2957,7 @@ test "@intFromFloat on vector" { | ... | @@ -2935,6 +2957,7 @@ test "@intFromFloat on vector" { |
| 2935 | } | 2957 | } |
| 2936 | 2958 | ||
| 2937 | test "@intFromBool on vector" { | 2959 | test "@intFromBool on vector" { |
| 2960 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2938 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 2961 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 2939 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2962 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2940 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2963 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -3061,6 +3084,7 @@ test "peer type resolution: slice of sentinel-terminated array" { | ... | @@ -3061,6 +3084,7 @@ test "peer type resolution: slice of sentinel-terminated array" { |
| 3061 | } | 3084 | } |
| 3062 | 3085 | ||
| 3063 | test "@intFromFloat boundary cases" { | 3086 | test "@intFromFloat boundary cases" { |
| 3087 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 3064 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 3088 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 3065 | 3089 | ||
| 3066 | const S = struct { | 3090 | const S = struct { |
| ... | @@ -3092,6 +3116,7 @@ test "@intFromFloat boundary cases" { | ... | @@ -3092,6 +3116,7 @@ test "@intFromFloat boundary cases" { |
| 3092 | } | 3116 | } |
| 3093 | 3117 | ||
| 3094 | test "@intFromFloat vector boundary cases" { | 3118 | test "@intFromFloat vector boundary cases" { |
| 3119 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 3095 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 3120 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 3096 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 3121 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 3097 | 3122 |
test/behavior/cast_int.zig+4| ... | @@ -19,6 +19,7 @@ test "@intCast i32 to u7" { | ... | @@ -19,6 +19,7 @@ test "@intCast i32 to u7" { |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | test "coerce i8 to i32 and @intCast back" { | 21 | test "coerce i8 to i32 and @intCast back" { |
| 22 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 22 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 23 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 23 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 24 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 24 | 25 | ||
| ... | @@ -34,6 +35,7 @@ test "coerce i8 to i32 and @intCast back" { | ... | @@ -34,6 +35,7 @@ test "coerce i8 to i32 and @intCast back" { |
| 34 | } | 35 | } |
| 35 | 36 | ||
| 36 | test "coerce non byte-sized integers accross 32bits boundary" { | 37 | test "coerce non byte-sized integers accross 32bits boundary" { |
| 38 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 37 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO | 39 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO |
| 38 | 40 | ||
| 39 | { | 41 | { |
| ... | @@ -144,6 +146,7 @@ fn testIntCast(comptime S: type, a: S, comptime D: type, expected: D) !void { | ... | @@ -144,6 +146,7 @@ fn testIntCast(comptime S: type, a: S, comptime D: type, expected: D) !void { |
| 144 | 146 | ||
| 145 | test "@intCast <= 64 bits" { | 147 | test "@intCast <= 64 bits" { |
| 146 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 148 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 149 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 147 | 150 | ||
| 148 | try testIntCast(i32, minInt(i32), i64, minInt(i32)); | 151 | try testIntCast(i32, minInt(i32), i64, minInt(i32)); |
| 149 | try testIntCast(i32, maxInt(i32), i64, maxInt(i32)); | 152 | try testIntCast(i32, maxInt(i32), i64, maxInt(i32)); |
| ... | @@ -170,6 +173,7 @@ test "@intCast <= 64 bits" { | ... | @@ -170,6 +173,7 @@ test "@intCast <= 64 bits" { |
| 170 | test "@intCast > 128 bits" { | 173 | test "@intCast > 128 bits" { |
| 171 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 174 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 172 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 175 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 176 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 173 | 177 | ||
| 174 | try testIntCast(u8, 123, u140, 123); | 178 | try testIntCast(u8, 123, u140, 123); |
| 175 | try testIntCast(u64, 1 << 63, u140, 1 << 63); | 179 | try testIntCast(u64, 1 << 63, u140, 1 << 63); |
test/behavior/comptime_memory.zig+4| ... | @@ -431,6 +431,8 @@ test "type pun @ptrFromInt" { | ... | @@ -431,6 +431,8 @@ test "type pun @ptrFromInt" { |
| 431 | } | 431 | } |
| 432 | 432 | ||
| 433 | test "type pun null pointer-like optional" { | 433 | test "type pun null pointer-like optional" { |
| 434 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 435 | |||
| 434 | const p: ?*u8 = null; | 436 | const p: ?*u8 = null; |
| 435 | // note that expectEqual hides the bug | 437 | // note that expectEqual hides the bug |
| 436 | try testing.expect(@as(*const ?*i8, @ptrCast(&p)).* == null); | 438 | try testing.expect(@as(*const ?*i8, @ptrCast(&p)).* == null); |
| ... | @@ -553,6 +555,8 @@ test "comptime store of packed struct with void field into array" { | ... | @@ -553,6 +555,8 @@ test "comptime store of packed struct with void field into array" { |
| 553 | } | 555 | } |
| 554 | 556 | ||
| 555 | test "comptime store of reinterpreted zero-bit type" { | 557 | test "comptime store of reinterpreted zero-bit type" { |
| 558 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 559 | |||
| 556 | const S = struct { | 560 | const S = struct { |
| 557 | fn doTheTest(comptime T: type) void { | 561 | fn doTheTest(comptime T: type) void { |
| 558 | comptime var buf: T = undefined; | 562 | comptime var buf: T = undefined; |
test/behavior/decl_literals.zig+2| ... | @@ -49,6 +49,8 @@ test "call decl literal with optional" { | ... | @@ -49,6 +49,8 @@ test "call decl literal with optional" { |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | test "call decl literal with pointer" { | 51 | test "call decl literal with pointer" { |
| 52 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 53 | |||
| 52 | const S = struct { | 54 | const S = struct { |
| 53 | x: u32, | 55 | x: u32, |
| 54 | fn init() *const @This() { | 56 | fn init() *const @This() { |
test/behavior/defer.zig+2| ... | @@ -5,6 +5,8 @@ const expectEqual = std.testing.expectEqual; | ... | @@ -5,6 +5,8 @@ const expectEqual = std.testing.expectEqual; |
| 5 | const expectError = std.testing.expectError; | 5 | const expectError = std.testing.expectError; |
| 6 | 6 | ||
| 7 | test "break and continue inside loop inside defer expression" { | 7 | test "break and continue inside loop inside defer expression" { |
| 8 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 9 | |||
| 8 | testBreakContInDefer(10); | 10 | testBreakContInDefer(10); |
| 9 | comptime testBreakContInDefer(10); | 11 | comptime testBreakContInDefer(10); |
| 10 | } | 12 | } |
test/behavior/enum.zig+4| ... | @@ -26,6 +26,7 @@ const EnumFromIntNumber = enum { Zero, One, Two, Three, Four }; | ... | @@ -26,6 +26,7 @@ const EnumFromIntNumber = enum { Zero, One, Two, Three, Four }; |
| 26 | 26 | ||
| 27 | test "int to enum" { | 27 | test "int to enum" { |
| 28 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 28 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 29 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 29 | 30 | ||
| 30 | try testEnumFromIntEval(3); | 31 | try testEnumFromIntEval(3); |
| 31 | } | 32 | } |
| ... | @@ -1059,6 +1060,7 @@ test "tag name with signed enum values" { | ... | @@ -1059,6 +1060,7 @@ test "tag name with signed enum values" { |
| 1059 | test "tag name with large enum values" { | 1060 | test "tag name with large enum values" { |
| 1060 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1061 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1061 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1062 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1063 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1062 | 1064 | ||
| 1063 | const Kdf = enum(u128) { | 1065 | const Kdf = enum(u128) { |
| 1064 | aes_kdf = 0xea4f8ac1080d74bf60448a629af3d9c9, | 1066 | aes_kdf = 0xea4f8ac1080d74bf60448a629af3d9c9, |
| ... | @@ -1078,6 +1080,7 @@ test "tag name with large enum values" { | ... | @@ -1078,6 +1080,7 @@ test "tag name with large enum values" { |
| 1078 | test "@tagName with exotic integer enum types" { | 1080 | test "@tagName with exotic integer enum types" { |
| 1079 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1081 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1080 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1082 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1083 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1081 | 1084 | ||
| 1082 | const S = struct { | 1085 | const S = struct { |
| 1083 | fn testEnumSigned(comptime T: type) !void { | 1086 | fn testEnumSigned(comptime T: type) !void { |
| ... | @@ -1280,6 +1283,7 @@ test "tag name functions are unique" { | ... | @@ -1280,6 +1283,7 @@ test "tag name functions are unique" { |
| 1280 | 1283 | ||
| 1281 | test "size of enum with only one tag which has explicit integer tag type" { | 1284 | test "size of enum with only one tag which has explicit integer tag type" { |
| 1282 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1285 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1286 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1283 | 1287 | ||
| 1284 | const E = enum(u8) { nope = 10 }; | 1288 | const E = enum(u8) { nope = 10 }; |
| 1285 | const S0 = struct { e: E }; | 1289 | const S0 = struct { e: E }; |
test/behavior/error.zig+5| ... | @@ -145,6 +145,8 @@ test "implicit cast to optional to error union to return result loc" { | ... | @@ -145,6 +145,8 @@ test "implicit cast to optional to error union to return result loc" { |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | test "fn returning empty error set can be passed as fn returning any error" { | 147 | test "fn returning empty error set can be passed as fn returning any error" { |
| 148 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 149 | |||
| 148 | entry(); | 150 | entry(); |
| 149 | comptime entry(); | 151 | comptime entry(); |
| 150 | } | 152 | } |
| ... | @@ -526,6 +528,7 @@ test "function pointer with return type that is error union with payload which i | ... | @@ -526,6 +528,7 @@ test "function pointer with return type that is error union with payload which i |
| 526 | } | 528 | } |
| 527 | 529 | ||
| 528 | test "return result loc as peer result loc in inferred error set function" { | 530 | test "return result loc as peer result loc in inferred error set function" { |
| 531 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 529 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 532 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 530 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 533 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 531 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 534 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -557,6 +560,7 @@ test "return result loc as peer result loc in inferred error set function" { | ... | @@ -557,6 +560,7 @@ test "return result loc as peer result loc in inferred error set function" { |
| 557 | } | 560 | } |
| 558 | 561 | ||
| 559 | test "error payload type is correctly resolved" { | 562 | test "error payload type is correctly resolved" { |
| 563 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 560 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 564 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 561 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 565 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 562 | 566 | ||
| ... | @@ -1111,6 +1115,7 @@ test "'if' ignores error via local while 'else' ignores error directly" { | ... | @@ -1111,6 +1115,7 @@ test "'if' ignores error via local while 'else' ignores error directly" { |
| 1111 | } | 1115 | } |
| 1112 | 1116 | ||
| 1113 | test "@errorCast into own inferred error set" { | 1117 | test "@errorCast into own inferred error set" { |
| 1118 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1114 | const static = struct { | 1119 | const static = struct { |
| 1115 | fn foo(b: bool) !void { | 1120 | fn foo(b: bool) !void { |
| 1116 | if (b) { | 1121 | if (b) { |
test/behavior/eval.zig+5| ... | @@ -883,6 +883,8 @@ test "debug variable type resolved through indirect zero-bit types" { | ... | @@ -883,6 +883,8 @@ test "debug variable type resolved through indirect zero-bit types" { |
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | test "const local with comptime init through array init" { | 885 | test "const local with comptime init through array init" { |
| 886 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 887 | |||
| 886 | const E1 = enum { | 888 | const E1 = enum { |
| 887 | A, | 889 | A, |
| 888 | pub fn a() void {} | 890 | pub fn a() void {} |
| ... | @@ -902,6 +904,7 @@ test "const local with comptime init through array init" { | ... | @@ -902,6 +904,7 @@ test "const local with comptime init through array init" { |
| 902 | } | 904 | } |
| 903 | 905 | ||
| 904 | test "closure capture type of runtime-known parameter" { | 906 | test "closure capture type of runtime-known parameter" { |
| 907 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 905 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 908 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 906 | 909 | ||
| 907 | const S = struct { | 910 | const S = struct { |
| ... | @@ -1158,6 +1161,8 @@ test "repeated value is correctly expanded" { | ... | @@ -1158,6 +1161,8 @@ test "repeated value is correctly expanded" { |
| 1158 | } | 1161 | } |
| 1159 | 1162 | ||
| 1160 | test "value in if block is comptime-known" { | 1163 | test "value in if block is comptime-known" { |
| 1164 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1165 | |||
| 1161 | const first = blk: { | 1166 | const first = blk: { |
| 1162 | const s = if (false) "a" else "b"; | 1167 | const s = if (false) "a" else "b"; |
| 1163 | break :blk "foo" ++ s; | 1168 | break :blk "foo" ++ s; |
test/behavior/floatop.zig+1| ... | @@ -1546,6 +1546,7 @@ fn testNeg(comptime T: type) !void { | ... | @@ -1546,6 +1546,7 @@ fn testNeg(comptime T: type) !void { |
| 1546 | 1546 | ||
| 1547 | test "negate f80" { | 1547 | test "negate f80" { |
| 1548 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 1548 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 1549 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1549 | 1550 | ||
| 1550 | var f: f80 = 0.0; | 1551 | var f: f80 = 0.0; |
| 1551 | const a: u80 = @bitCast(f); | 1552 | const a: u80 = @bitCast(f); |
test/behavior/fn.zig+5| ... | @@ -292,6 +292,7 @@ fn voidFun(a: i32, b: void, c: i32, d: void) !void { | ... | @@ -292,6 +292,7 @@ fn voidFun(a: i32, b: void, c: i32, d: void) !void { |
| 292 | 292 | ||
| 293 | test "call function with empty string" { | 293 | test "call function with empty string" { |
| 294 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 294 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 295 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 295 | 296 | ||
| 296 | acceptsString(""); | 297 | acceptsString(""); |
| 297 | } | 298 | } |
| ... | @@ -405,6 +406,7 @@ test "function with inferred error set but returning no error" { | ... | @@ -405,6 +406,7 @@ test "function with inferred error set but returning no error" { |
| 405 | 406 | ||
| 406 | test "import passed byref to function in return type" { | 407 | test "import passed byref to function in return type" { |
| 407 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 408 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 409 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 408 | 410 | ||
| 409 | const S = struct { | 411 | const S = struct { |
| 410 | fn get() @import("std").ArrayList(i32) { | 412 | fn get() @import("std").ArrayList(i32) { |
| ... | @@ -440,6 +442,7 @@ test "implicit cast function to function ptr" { | ... | @@ -440,6 +442,7 @@ test "implicit cast function to function ptr" { |
| 440 | test "method call with optional and error union first param" { | 442 | test "method call with optional and error union first param" { |
| 441 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 443 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 442 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 444 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 445 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 443 | 446 | ||
| 444 | const S = struct { | 447 | const S = struct { |
| 445 | x: i32 = 1234, | 448 | x: i32 = 1234, |
| ... | @@ -744,6 +747,8 @@ test "coerce generic function making generic parameter concrete" { | ... | @@ -744,6 +747,8 @@ test "coerce generic function making generic parameter concrete" { |
| 744 | } | 747 | } |
| 745 | 748 | ||
| 746 | test "return undefined pointer from function, directly and by expired local" { | 749 | test "return undefined pointer from function, directly and by expired local" { |
| 750 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 751 | |||
| 747 | const S = struct { | 752 | const S = struct { |
| 748 | var global: i32 = 1; | 753 | var global: i32 = 1; |
| 749 | 754 |
test/behavior/for.zig+2| ... | @@ -521,6 +521,8 @@ test "return from inline for" { | ... | @@ -521,6 +521,8 @@ test "return from inline for" { |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | test "for loop 0 length range" { | 523 | test "for loop 0 length range" { |
| 524 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 525 | |||
| 524 | const map: []const u8 = &.{}; | 526 | const map: []const u8 = &.{}; |
| 525 | for (map, 0..map.len) |i, j| { | 527 | for (map, 0..map.len) |i, j| { |
| 526 | _ = i; | 528 | _ = i; |
test/behavior/generics.zig+3| ... | @@ -439,6 +439,8 @@ test "return type of generic function is function pointer" { | ... | @@ -439,6 +439,8 @@ test "return type of generic function is function pointer" { |
| 439 | } | 439 | } |
| 440 | 440 | ||
| 441 | test "coerced function body has inequal value with its uncoerced body" { | 441 | test "coerced function body has inequal value with its uncoerced body" { |
| 442 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 443 | |||
| 442 | const S = struct { | 444 | const S = struct { |
| 443 | const A = B(i32, c); | 445 | const A = B(i32, c); |
| 444 | fn c() !i32 { | 446 | fn c() !i32 { |
| ... | @@ -521,6 +523,7 @@ test "call generic function with from function called by the generic function" { | ... | @@ -521,6 +523,7 @@ test "call generic function with from function called by the generic function" { |
| 521 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 523 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 522 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 524 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 523 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 525 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 526 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 524 | 527 | ||
| 525 | const GET = struct { | 528 | const GET = struct { |
| 526 | key: []const u8, | 529 | key: []const u8, |
test/behavior/globals.zig+1| ... | @@ -42,6 +42,7 @@ test "slices pointing at the same address as global array." { | ... | @@ -42,6 +42,7 @@ test "slices pointing at the same address as global array." { |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | test "global loads can affect liveness" { | 44 | test "global loads can affect liveness" { |
| 45 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 45 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; | 46 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; |
| 46 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 47 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 47 | 48 |
test/behavior/incomplete_struct_param_tld.zig+1| ... | @@ -23,6 +23,7 @@ fn foo(a: A) i32 { | ... | @@ -23,6 +23,7 @@ fn foo(a: A) i32 { |
| 23 | 23 | ||
| 24 | test "incomplete struct param top level declaration" { | 24 | test "incomplete struct param top level declaration" { |
| 25 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 25 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 26 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 26 | 27 | ||
| 27 | const a = A{ | 28 | const a = A{ |
| 28 | .b = B{ | 29 | .b = B{ |
test/behavior/inline_switch.zig+3| ... | @@ -45,6 +45,7 @@ const U = union(E) { a: void, b: u2, c: u3, d: u4 }; | ... | @@ -45,6 +45,7 @@ const U = union(E) { a: void, b: u2, c: u3, d: u4 }; |
| 45 | test "inline switch unions" { | 45 | test "inline switch unions" { |
| 46 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 46 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 47 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 47 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 48 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 48 | 49 | ||
| 49 | var x: U = .a; | 50 | var x: U = .a; |
| 50 | _ = &x; | 51 | _ = &x; |
| ... | @@ -138,6 +139,8 @@ test "inline else int all values" { | ... | @@ -138,6 +139,8 @@ test "inline else int all values" { |
| 138 | } | 139 | } |
| 139 | 140 | ||
| 140 | test "inline switch capture is set when switch operand is comptime known" { | 141 | test "inline switch capture is set when switch operand is comptime known" { |
| 142 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 143 | |||
| 141 | const U2 = union(enum) { | 144 | const U2 = union(enum) { |
| 142 | a: u32, | 145 | a: u32, |
| 143 | }; | 146 | }; |
test/behavior/math.zig+22| ... | @@ -1114,6 +1114,7 @@ test "@mulWithOverflow bitsize 128 bits" { | ... | @@ -1114,6 +1114,7 @@ test "@mulWithOverflow bitsize 128 bits" { |
| 1114 | test "@mulWithOverflow > 128 bits" { | 1114 | test "@mulWithOverflow > 128 bits" { |
| 1115 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1115 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1116 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1116 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1117 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1117 | 1118 | ||
| 1118 | try testMulWithOverflow(u140, 0, maxInt(u140), 0, 0); | 1119 | try testMulWithOverflow(u140, 0, maxInt(u140), 0, 0); |
| 1119 | try testMulWithOverflow(u140, 1, maxInt(u140), maxInt(u140), 0); | 1120 | try testMulWithOverflow(u140, 1, maxInt(u140), maxInt(u140), 0); |
| ... | @@ -1340,6 +1341,7 @@ test "@shlWithOverflow > 64 bits" { | ... | @@ -1340,6 +1341,7 @@ test "@shlWithOverflow > 64 bits" { |
| 1340 | test "@shlWithOverflow > 128 bits" { | 1341 | test "@shlWithOverflow > 128 bits" { |
| 1341 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1342 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1342 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1343 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1344 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1343 | 1345 | ||
| 1344 | try testShlWithOverflow(u140, 1 << 100, 20, 1 << 120, 0); | 1346 | try testShlWithOverflow(u140, 1 << 100, 20, 1 << 120, 0); |
| 1345 | try testShlWithOverflow(u140, 1 << 100, 40, 0, 1); | 1347 | try testShlWithOverflow(u140, 1 << 100, 40, 0, 1); |
| ... | @@ -1369,6 +1371,7 @@ fn testAnd(comptime T: type, a: T, b: T, expected: T) !void { | ... | @@ -1369,6 +1371,7 @@ fn testAnd(comptime T: type, a: T, b: T, expected: T) !void { |
| 1369 | test "and > 128 bits" { | 1371 | test "and > 128 bits" { |
| 1370 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1372 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1371 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1373 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1374 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1372 | 1375 | ||
| 1373 | try testAnd(u140, (1 << 139) | (1 << 70) | 0xaa, (1 << 139) | (1 << 69) | 0xcc, (1 << 139) | 0x88); | 1376 | try testAnd(u140, (1 << 139) | (1 << 70) | 0xaa, (1 << 139) | (1 << 69) | 0xcc, (1 << 139) | 0x88); |
| 1374 | try testAnd(u140, maxInt(u140), 1 << 100, 1 << 100); | 1377 | try testAnd(u140, maxInt(u140), 1 << 100, 1 << 100); |
| ... | @@ -1398,6 +1401,7 @@ fn testOr(comptime T: type, a: T, b: T, expected: T) !void { | ... | @@ -1398,6 +1401,7 @@ fn testOr(comptime T: type, a: T, b: T, expected: T) !void { |
| 1398 | test "or > 128 bits" { | 1401 | test "or > 128 bits" { |
| 1399 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1402 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1400 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1403 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1404 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1401 | 1405 | ||
| 1402 | try testOr(u140, 0, 1 << 139, 1 << 139); | 1406 | try testOr(u140, 0, 1 << 139, 1 << 139); |
| 1403 | try testOr(u140, (1 << 70) | 0xa, (1 << 69) | 0x5, (1 << 70) | (1 << 69) | 0xf); | 1407 | try testOr(u140, (1 << 70) | 0xa, (1 << 69) | 0x5, (1 << 70) | (1 << 69) | 0xf); |
| ... | @@ -1427,6 +1431,7 @@ fn testXor(comptime T: type, a: T, b: T, expected: T) !void { | ... | @@ -1427,6 +1431,7 @@ fn testXor(comptime T: type, a: T, b: T, expected: T) !void { |
| 1427 | test "xor > 128 bits" { | 1431 | test "xor > 128 bits" { |
| 1428 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1432 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1429 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1433 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1434 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1430 | 1435 | ||
| 1431 | try testXor(u140, 0, maxInt(u140), maxInt(u140)); | 1436 | try testXor(u140, 0, maxInt(u140), maxInt(u140)); |
| 1432 | try testXor(u140, 1 << 139, 1 << 139, 0); | 1437 | try testXor(u140, 1 << 139, 1 << 139, 0); |
| ... | @@ -1456,6 +1461,7 @@ fn testNot(comptime T: type, a: T, expected: T) !void { | ... | @@ -1456,6 +1461,7 @@ fn testNot(comptime T: type, a: T, expected: T) !void { |
| 1456 | test "not > 128 bits" { | 1461 | test "not > 128 bits" { |
| 1457 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1462 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1458 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1463 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1464 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1459 | 1465 | ||
| 1460 | try testNot(u140, 0, maxInt(u140)); | 1466 | try testNot(u140, 0, maxInt(u140)); |
| 1461 | try testNot(u140, maxInt(u140), 0); | 1467 | try testNot(u140, maxInt(u140), 0); |
| ... | @@ -1485,6 +1491,7 @@ fn testShl(comptime T: type, a: T, b: std.math.Log2Int(T), expected: T) !void { | ... | @@ -1485,6 +1491,7 @@ fn testShl(comptime T: type, a: T, b: std.math.Log2Int(T), expected: T) !void { |
| 1485 | test "shl > 128 bits" { | 1491 | test "shl > 128 bits" { |
| 1486 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1492 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1487 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1493 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1494 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1488 | 1495 | ||
| 1489 | try testShl(u140, 1 << 5, 10, 1 << 15); | 1496 | try testShl(u140, 1 << 5, 10, 1 << 15); |
| 1490 | try testShl(u140, 3, 138, (1 << 139) | (1 << 138)); | 1497 | try testShl(u140, 3, 138, (1 << 139) | (1 << 138)); |
| ... | @@ -1514,6 +1521,7 @@ fn testShr(comptime T: type, a: T, b: std.math.Log2Int(T), expected: T) !void { | ... | @@ -1514,6 +1521,7 @@ fn testShr(comptime T: type, a: T, b: std.math.Log2Int(T), expected: T) !void { |
| 1514 | test "shr > 128 bits" { | 1521 | test "shr > 128 bits" { |
| 1515 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1522 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1516 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1523 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1524 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1517 | 1525 | ||
| 1518 | try testShr(u140, 1 << 139, 39, 1 << 100); | 1526 | try testShr(u140, 1 << 139, 39, 1 << 100); |
| 1519 | try testShr(u140, (1 << 70) | 8, 3, (1 << 67) | 1); | 1527 | try testShr(u140, (1 << 70) | 8, 3, (1 << 67) | 1); |
| ... | @@ -1543,6 +1551,7 @@ fn testClz(comptime T: type, a: T, expected: u16) !void { | ... | @@ -1543,6 +1551,7 @@ fn testClz(comptime T: type, a: T, expected: u16) !void { |
| 1543 | test "@clz > 128 bits" { | 1551 | test "@clz > 128 bits" { |
| 1544 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1552 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1545 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1553 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1554 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1546 | 1555 | ||
| 1547 | try testClz(u140, 0, 140); | 1556 | try testClz(u140, 0, 140); |
| 1548 | try testClz(u140, 1 << 139, 0); | 1557 | try testClz(u140, 1 << 139, 0); |
| ... | @@ -1572,6 +1581,7 @@ fn testCtz(comptime T: type, a: T, expected: u16) !void { | ... | @@ -1572,6 +1581,7 @@ fn testCtz(comptime T: type, a: T, expected: u16) !void { |
| 1572 | test "@ctz > 128 bits" { | 1581 | test "@ctz > 128 bits" { |
| 1573 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1582 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1574 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1583 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1584 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1575 | 1585 | ||
| 1576 | try testCtz(u140, 0, 140); | 1586 | try testCtz(u140, 0, 140); |
| 1577 | try testCtz(u140, 1 << 139, 139); | 1587 | try testCtz(u140, 1 << 139, 139); |
| ... | @@ -1601,6 +1611,7 @@ fn testPopCount(comptime T: type, a: T, expected: u16) !void { | ... | @@ -1601,6 +1611,7 @@ fn testPopCount(comptime T: type, a: T, expected: u16) !void { |
| 1601 | test "@popCount > 128 bits" { | 1611 | test "@popCount > 128 bits" { |
| 1602 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1612 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1603 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1613 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1614 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1604 | 1615 | ||
| 1605 | try testPopCount(u140, 0, 0); | 1616 | try testPopCount(u140, 0, 0); |
| 1606 | try testPopCount(u140, maxInt(u140), 140); | 1617 | try testPopCount(u140, maxInt(u140), 140); |
| ... | @@ -1630,6 +1641,7 @@ fn testBitReverse(comptime T: type, a: T, expected: T) !void { | ... | @@ -1630,6 +1641,7 @@ fn testBitReverse(comptime T: type, a: T, expected: T) !void { |
| 1630 | test "@bitReverse > 128 bits" { | 1641 | test "@bitReverse > 128 bits" { |
| 1631 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1642 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1632 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1643 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1644 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1633 | 1645 | ||
| 1634 | try testBitReverse(u140, 1 << 139, 1); | 1646 | try testBitReverse(u140, 1 << 139, 1); |
| 1635 | try testBitReverse(u140, 1 << 70, 1 << 69); | 1647 | try testBitReverse(u140, 1 << 70, 1 << 69); |
| ... | @@ -1659,6 +1671,7 @@ fn testByteSwap(comptime T: type, a: T, expected: T) !void { | ... | @@ -1659,6 +1671,7 @@ fn testByteSwap(comptime T: type, a: T, expected: T) !void { |
| 1659 | test "@byteSwap > 128 bits" { | 1671 | test "@byteSwap > 128 bits" { |
| 1660 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1672 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1661 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1673 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1674 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1662 | 1675 | ||
| 1663 | try testByteSwap(u144, 1 << 136, 1); | 1676 | try testByteSwap(u144, 1 << 136, 1); |
| 1664 | try testByteSwap(u144, 1, 1 << 136); | 1677 | try testByteSwap(u144, 1, 1 << 136); |
| ... | @@ -1688,6 +1701,7 @@ fn testMax(comptime T: type, a: T, b: T, expected: T) !void { | ... | @@ -1688,6 +1701,7 @@ fn testMax(comptime T: type, a: T, b: T, expected: T) !void { |
| 1688 | test "@max > 128 bits" { | 1701 | test "@max > 128 bits" { |
| 1689 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1702 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1690 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1703 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1704 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1691 | 1705 | ||
| 1692 | try testMax(u140, 0, maxInt(u140), maxInt(u140)); | 1706 | try testMax(u140, 0, maxInt(u140), maxInt(u140)); |
| 1693 | try testMax(u140, 1 << 139, 1 << 138, 1 << 139); | 1707 | try testMax(u140, 1 << 139, 1 << 138, 1 << 139); |
| ... | @@ -1717,6 +1731,7 @@ fn testMin(comptime T: type, a: T, b: T, expected: T) !void { | ... | @@ -1717,6 +1731,7 @@ fn testMin(comptime T: type, a: T, b: T, expected: T) !void { |
| 1717 | test "@min > 128 bits" { | 1731 | test "@min > 128 bits" { |
| 1718 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1732 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1719 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1733 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1734 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1720 | 1735 | ||
| 1721 | try testMin(u140, 0, maxInt(u140), 0); | 1736 | try testMin(u140, 0, maxInt(u140), 0); |
| 1722 | try testMin(u140, 1 << 139, 1 << 138, 1 << 138); | 1737 | try testMin(u140, 1 << 139, 1 << 138, 1 << 138); |
| ... | @@ -1746,6 +1761,7 @@ fn testAbs(comptime T: type, a: T, expected: anytype) !void { | ... | @@ -1746,6 +1761,7 @@ fn testAbs(comptime T: type, a: T, expected: anytype) !void { |
| 1746 | test "@abs > 128 bits" { | 1761 | test "@abs > 128 bits" { |
| 1747 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1762 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1748 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1763 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1764 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1749 | 1765 | ||
| 1750 | try testAbs(u140, 0, 0); | 1766 | try testAbs(u140, 0, 0); |
| 1751 | try testAbs(u140, 1 << 139, 1 << 139); | 1767 | try testAbs(u140, 1 << 139, 1 << 139); |
| ... | @@ -1770,6 +1786,7 @@ fn testRem(comptime T: type, numerator: T, denominator: T, expected: T) !void { | ... | @@ -1770,6 +1786,7 @@ fn testRem(comptime T: type, numerator: T, denominator: T, expected: T) !void { |
| 1770 | test "@rem > 128 bits" { | 1786 | test "@rem > 128 bits" { |
| 1771 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1787 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1772 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1788 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1789 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1773 | 1790 | ||
| 1774 | try testRem(u140, 0, maxInt(u140), 0); | 1791 | try testRem(u140, 0, maxInt(u140), 0); |
| 1775 | try testRem(u140, maxInt(u140), maxInt(u140), 0); | 1792 | try testRem(u140, maxInt(u140), maxInt(u140), 0); |
| ... | @@ -1797,6 +1814,7 @@ fn testMod(comptime T: type, numerator: T, denominator: T, expected: T) !void { | ... | @@ -1797,6 +1814,7 @@ fn testMod(comptime T: type, numerator: T, denominator: T, expected: T) !void { |
| 1797 | test "@mod > 128 bits" { | 1814 | test "@mod > 128 bits" { |
| 1798 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1815 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1799 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1816 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1817 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1800 | 1818 | ||
| 1801 | try testMod(u140, 0, maxInt(u140), 0); | 1819 | try testMod(u140, 0, maxInt(u140), 0); |
| 1802 | try testMod(u140, maxInt(u140), maxInt(u140), 0); | 1820 | try testMod(u140, maxInt(u140), maxInt(u140), 0); |
| ... | @@ -1824,6 +1842,7 @@ fn testDivFloor(comptime T: type, numerator: T, denominator: T, expected: T) !vo | ... | @@ -1824,6 +1842,7 @@ fn testDivFloor(comptime T: type, numerator: T, denominator: T, expected: T) !vo |
| 1824 | test "@divFloor > 128 bits" { | 1842 | test "@divFloor > 128 bits" { |
| 1825 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1843 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1826 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1844 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1845 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1827 | 1846 | ||
| 1828 | try testDivFloor(u140, 0, maxInt(u140), 0); | 1847 | try testDivFloor(u140, 0, maxInt(u140), 0); |
| 1829 | try testDivFloor(u140, maxInt(u140), maxInt(u140), 1); | 1848 | try testDivFloor(u140, maxInt(u140), maxInt(u140), 1); |
| ... | @@ -1852,6 +1871,7 @@ fn testDivTrunc(comptime T: type, numerator: T, denominator: T, expected: T) !vo | ... | @@ -1852,6 +1871,7 @@ fn testDivTrunc(comptime T: type, numerator: T, denominator: T, expected: T) !vo |
| 1852 | test "@divTrunc > 128 bits" { | 1871 | test "@divTrunc > 128 bits" { |
| 1853 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1872 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1854 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 1873 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1874 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1855 | 1875 | ||
| 1856 | try testDivTrunc(u140, 0, maxInt(u140), 0); | 1876 | try testDivTrunc(u140, 0, maxInt(u140), 0); |
| 1857 | try testDivTrunc(u140, maxInt(u140), maxInt(u140), 1); | 1877 | try testDivTrunc(u140, maxInt(u140), maxInt(u140), 1); |
| ... | @@ -2598,6 +2618,8 @@ test "comptime float vector multiplication of zero by nan is nan" { | ... | @@ -2598,6 +2618,8 @@ test "comptime float vector multiplication of zero by nan is nan" { |
| 2598 | } | 2618 | } |
| 2599 | 2619 | ||
| 2600 | test "i96 operations" { | 2620 | test "i96 operations" { |
| 2621 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2622 | |||
| 2601 | // This is coverage for some stuff used by std.Io timestamps, to catch | 2623 | // This is coverage for some stuff used by std.Io timestamps, to catch |
| 2602 | // issues earlier than bootstrapping. | 2624 | // issues earlier than bootstrapping. |
| 2603 | const Op_i96 = union(enum) { | 2625 | const Op_i96 = union(enum) { |
test/behavior/maximum_minimum.zig+4| ... | @@ -160,6 +160,7 @@ test "@min/@max more than two arguments" { | ... | @@ -160,6 +160,7 @@ test "@min/@max more than two arguments" { |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | test "@min/@max more than two vector arguments" { | 162 | test "@min/@max more than two vector arguments" { |
| 163 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 163 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 164 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 164 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 165 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 165 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 166 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -189,6 +190,7 @@ test "@min/@max notices bounds" { | ... | @@ -189,6 +190,7 @@ test "@min/@max notices bounds" { |
| 189 | } | 190 | } |
| 190 | 191 | ||
| 191 | test "@min/@max notices vector bounds" { | 192 | test "@min/@max notices vector bounds" { |
| 193 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 192 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 194 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 193 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 195 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 194 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 196 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -239,6 +241,7 @@ test "@min/@max notices bounds from types" { | ... | @@ -239,6 +241,7 @@ test "@min/@max notices bounds from types" { |
| 239 | } | 241 | } |
| 240 | 242 | ||
| 241 | test "@min/@max notices bounds from vector types" { | 243 | test "@min/@max notices bounds from vector types" { |
| 244 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 242 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 245 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 243 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 246 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 244 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 247 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -348,6 +351,7 @@ test "@min/@max with runtime signed and unsigned integers of same size" { | ... | @@ -348,6 +351,7 @@ test "@min/@max with runtime signed and unsigned integers of same size" { |
| 348 | } | 351 | } |
| 349 | 352 | ||
| 350 | test "@min/@max with runtime vectors of signed and unsigned integers of same size" { | 353 | test "@min/@max with runtime vectors of signed and unsigned integers of same size" { |
| 354 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 351 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 355 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 352 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 356 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 353 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 357 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
test/behavior/memset.zig+4| ... | @@ -179,6 +179,8 @@ test "@memset with zero-length array" { | ... | @@ -179,6 +179,8 @@ test "@memset with zero-length array" { |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | test "@memset a global array" { | 181 | test "@memset a global array" { |
| 182 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 183 | |||
| 182 | const S = struct { | 184 | const S = struct { |
| 183 | var buf: [1]u32 = .{123}; | 185 | var buf: [1]u32 = .{123}; |
| 184 | }; | 186 | }; |
| ... | @@ -190,6 +192,8 @@ test "@memset a global array" { | ... | @@ -190,6 +192,8 @@ test "@memset a global array" { |
| 190 | } | 192 | } |
| 191 | 193 | ||
| 192 | test "@memset array of booleans" { | 194 | test "@memset array of booleans" { |
| 195 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 196 | |||
| 193 | const S = struct { | 197 | const S = struct { |
| 194 | var x: bool = false; | 198 | var x: bool = false; |
| 195 | var y: [1]bool = undefined; | 199 | var y: [1]bool = undefined; |
test/behavior/merge_error_sets.zig+1| ... | @@ -13,6 +13,7 @@ fn foo() C!void { | ... | @@ -13,6 +13,7 @@ fn foo() C!void { |
| 13 | 13 | ||
| 14 | test "merge error sets" { | 14 | test "merge error sets" { |
| 15 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 15 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 16 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 16 | 17 | ||
| 17 | if (foo()) { | 18 | if (foo()) { |
| 18 | @panic("unexpected"); | 19 | @panic("unexpected"); |
test/behavior/multiple_externs_with_conflicting_types.zig+3-1| ... | @@ -5,7 +5,9 @@ const A = extern struct { | ... | @@ -5,7 +5,9 @@ const A = extern struct { |
| 5 | extern fn issue529(?*A) void; | 5 | extern fn issue529(?*A) void; |
| 6 | 6 | ||
| 7 | comptime { | 7 | comptime { |
| 8 | _ = @import("conflicting_externs/b.zig"); | 8 | if (builtin.zig_backend != .stage2_spirv) { |
| 9 | _ = @import("conflicting_externs/b.zig"); | ||
| 10 | } | ||
| 9 | } | 11 | } |
| 10 | 12 | ||
| 11 | const builtin = @import("builtin"); | 13 | const builtin = @import("builtin"); |
test/behavior/optional.zig+6| ... | @@ -338,6 +338,7 @@ test "coerce an anon struct literal to optional struct" { | ... | @@ -338,6 +338,7 @@ test "coerce an anon struct literal to optional struct" { |
| 338 | test "0-bit child type coerced to optional return ptr result location" { | 338 | test "0-bit child type coerced to optional return ptr result location" { |
| 339 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 339 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 340 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 340 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 341 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 341 | 342 | ||
| 342 | const S = struct { | 343 | const S = struct { |
| 343 | fn doTheTest() !void { | 344 | fn doTheTest() !void { |
| ... | @@ -428,6 +429,7 @@ test "optional pointer to zero bit optional payload" { | ... | @@ -428,6 +429,7 @@ test "optional pointer to zero bit optional payload" { |
| 428 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 429 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 429 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 430 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 430 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 431 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 432 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 431 | 433 | ||
| 432 | const B = struct { | 434 | const B = struct { |
| 433 | fn foo(_: *@This()) void {} | 435 | fn foo(_: *@This()) void {} |
| ... | @@ -512,6 +514,8 @@ test "mutable optional of noreturn" { | ... | @@ -512,6 +514,8 @@ test "mutable optional of noreturn" { |
| 512 | } | 514 | } |
| 513 | 515 | ||
| 514 | test "orelse on C pointer" { | 516 | test "orelse on C pointer" { |
| 517 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 518 | |||
| 515 | // TODO https://github.com/ziglang/zig/issues/6597 | 519 | // TODO https://github.com/ziglang/zig/issues/6597 |
| 516 | const foo: [*c]const u8 = "hey"; | 520 | const foo: [*c]const u8 = "hey"; |
| 517 | const d = foo orelse @compileError("bad"); | 521 | const d = foo orelse @compileError("bad"); |
| ... | @@ -655,6 +659,8 @@ test "result location initialization of optional with OPV payload" { | ... | @@ -655,6 +659,8 @@ test "result location initialization of optional with OPV payload" { |
| 655 | } | 659 | } |
| 656 | 660 | ||
| 657 | test "global comptime only optional" { | 661 | test "global comptime only optional" { |
| 662 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 663 | |||
| 658 | const S = struct { | 664 | const S = struct { |
| 659 | const @"null": ?*type = null; | 665 | const @"null": ?*type = null; |
| 660 | const @"void": ?*const type = &void; | 666 | const @"void": ?*const type = &void; |
test/behavior/packed-struct.zig+3| ... | @@ -248,6 +248,7 @@ test "nested packed struct unaligned" { | ... | @@ -248,6 +248,7 @@ test "nested packed struct unaligned" { |
| 248 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 248 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 249 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 249 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 250 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 250 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 251 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 251 | 252 | ||
| 252 | const S1 = packed struct { | 253 | const S1 = packed struct { |
| 253 | a: u4, | 254 | a: u4, |
| ... | @@ -816,6 +817,7 @@ test "packed struct passed to callconv(.c) function" { | ... | @@ -816,6 +817,7 @@ test "packed struct passed to callconv(.c) function" { |
| 816 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 817 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 817 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 818 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 818 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 819 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 820 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 819 | 821 | ||
| 820 | const S = struct { | 822 | const S = struct { |
| 821 | const Packed = packed struct(u64) { | 823 | const Packed = packed struct(u64) { |
| ... | @@ -893,6 +895,7 @@ test "store undefined to packed result location" { | ... | @@ -893,6 +895,7 @@ test "store undefined to packed result location" { |
| 893 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 895 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 894 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 896 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 895 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 897 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 898 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 896 | 899 | ||
| 897 | var x: u4 = 0; | 900 | var x: u4 = 0; |
| 898 | _ = &x; | 901 | _ = &x; |
test/behavior/packed-union.zig+2| ... | @@ -201,6 +201,8 @@ test "packed union with explicit backing integer" { | ... | @@ -201,6 +201,8 @@ test "packed union with explicit backing integer" { |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | test "packed union equality" { | 203 | test "packed union equality" { |
| 204 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 205 | |||
| 204 | const Foo = packed union { | 206 | const Foo = packed union { |
| 205 | a: u4, | 207 | a: u4, |
| 206 | b: i4, | 208 | b: i4, |
test/behavior/pointers.zig+10| ... | @@ -136,6 +136,8 @@ test "implicit cast single item pointer to C pointer and back" { | ... | @@ -136,6 +136,8 @@ test "implicit cast single item pointer to C pointer and back" { |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | test "initialize const optional C pointer to null" { | 138 | test "initialize const optional C pointer to null" { |
| 139 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 140 | |||
| 139 | const a: ?[*c]i32 = null; | 141 | const a: ?[*c]i32 = null; |
| 140 | try expect(a == null); | 142 | try expect(a == null); |
| 141 | comptime assert(a == null); | 143 | comptime assert(a == null); |
| ... | @@ -643,6 +645,8 @@ test "result type preserved through multiple references" { | ... | @@ -643,6 +645,8 @@ test "result type preserved through multiple references" { |
| 643 | } | 645 | } |
| 644 | 646 | ||
| 645 | test "result type found through optional pointer" { | 647 | test "result type found through optional pointer" { |
| 648 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 649 | |||
| 646 | const ptr1: ?*const u32 = &@intCast(123); | 650 | const ptr1: ?*const u32 = &@intCast(123); |
| 647 | const ptr2: ?[]const u8 = &.{ @intCast(123), @truncate(0xABCD) }; | 651 | const ptr2: ?[]const u8 = &.{ @intCast(123), @truncate(0xABCD) }; |
| 648 | try expect(ptr1.?.* == 123); | 652 | try expect(ptr1.?.* == 123); |
| ... | @@ -720,6 +724,8 @@ test "cast pointers with zero sized elements" { | ... | @@ -720,6 +724,8 @@ test "cast pointers with zero sized elements" { |
| 720 | } | 724 | } |
| 721 | 725 | ||
| 722 | test "comptime pointer equality through distinct fields with well-defined layout" { | 726 | test "comptime pointer equality through distinct fields with well-defined layout" { |
| 727 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 728 | |||
| 723 | const A = extern struct { | 729 | const A = extern struct { |
| 724 | x: u32, | 730 | x: u32, |
| 725 | z: u16, | 731 | z: u16, |
| ... | @@ -744,6 +750,8 @@ test "comptime pointer equality through distinct fields with well-defined layout | ... | @@ -744,6 +750,8 @@ test "comptime pointer equality through distinct fields with well-defined layout |
| 744 | } | 750 | } |
| 745 | 751 | ||
| 746 | test "comptime pointer equality through distinct elements with well-defined layout" { | 752 | test "comptime pointer equality through distinct elements with well-defined layout" { |
| 753 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 754 | |||
| 747 | const buf: [2]u32 = .{ 123, 456 }; | 755 | const buf: [2]u32 = .{ 123, 456 }; |
| 748 | 756 | ||
| 749 | const ptr: *const [2]u32 = &buf; | 757 | const ptr: *const [2]u32 = &buf; |
| ... | @@ -780,6 +788,8 @@ test "pointers to elements of many-ptr to zero-bit type" { | ... | @@ -780,6 +788,8 @@ test "pointers to elements of many-ptr to zero-bit type" { |
| 780 | } | 788 | } |
| 781 | 789 | ||
| 782 | test "comptime C pointer to optional pointer" { | 790 | test "comptime C pointer to optional pointer" { |
| 791 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 792 | |||
| 783 | const opt: ?*u8 = @ptrFromInt(0x1000); | 793 | const opt: ?*u8 = @ptrFromInt(0x1000); |
| 784 | const outer_ptr: [*c]const ?*u8 = &opt; | 794 | const outer_ptr: [*c]const ?*u8 = &opt; |
| 785 | const inner_ptr = &outer_ptr.*.?; | 795 | const inner_ptr = &outer_ptr.*.?; |
test/behavior/ptrcast.zig+11| ... | @@ -193,6 +193,7 @@ const Bytes = struct { | ... | @@ -193,6 +193,7 @@ const Bytes = struct { |
| 193 | 193 | ||
| 194 | test "ptrcast of const integer has the correct object size" { | 194 | test "ptrcast of const integer has the correct object size" { |
| 195 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 195 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 196 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 196 | 197 | ||
| 197 | const is_value = ~@as(isize, @intCast(std.math.minInt(isize))); | 198 | const is_value = ~@as(isize, @intCast(std.math.minInt(isize))); |
| 198 | const is_bytes = @as([*]const u8, @ptrCast(&is_value))[0..@sizeOf(isize)]; | 199 | const is_bytes = @as([*]const u8, @ptrCast(&is_value))[0..@sizeOf(isize)]; |
| ... | @@ -279,6 +280,8 @@ test "@ptrCast undefined value at comptime" { | ... | @@ -279,6 +280,8 @@ test "@ptrCast undefined value at comptime" { |
| 279 | } | 280 | } |
| 280 | 281 | ||
| 281 | test "comptime @ptrCast with packed struct leaves value unmodified" { | 282 | test "comptime @ptrCast with packed struct leaves value unmodified" { |
| 283 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 284 | |||
| 282 | const S = packed struct { three: u3 }; | 285 | const S = packed struct { three: u3 }; |
| 283 | const st: S = .{ .three = 6 }; | 286 | const st: S = .{ .three = 6 }; |
| 284 | try expect(st.three == 6); | 287 | try expect(st.three == 6); |
| ... | @@ -288,6 +291,8 @@ test "comptime @ptrCast with packed struct leaves value unmodified" { | ... | @@ -288,6 +291,8 @@ test "comptime @ptrCast with packed struct leaves value unmodified" { |
| 288 | } | 291 | } |
| 289 | 292 | ||
| 290 | test "@ptrCast restructures comptime-only array" { | 293 | test "@ptrCast restructures comptime-only array" { |
| 294 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 295 | |||
| 291 | { | 296 | { |
| 292 | const a3a2: [3][2]comptime_int = .{ | 297 | const a3a2: [3][2]comptime_int = .{ |
| 293 | .{ 1, 2 }, | 298 | .{ 1, 2 }, |
| ... | @@ -330,6 +335,8 @@ test "@ptrCast restructures comptime-only array" { | ... | @@ -330,6 +335,8 @@ test "@ptrCast restructures comptime-only array" { |
| 330 | } | 335 | } |
| 331 | 336 | ||
| 332 | test "@ptrCast restructures sliced comptime-only array" { | 337 | test "@ptrCast restructures sliced comptime-only array" { |
| 338 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 339 | |||
| 333 | const a3a2: [4][2]comptime_int = .{ | 340 | const a3a2: [4][2]comptime_int = .{ |
| 334 | .{ 1, 2 }, | 341 | .{ 1, 2 }, |
| 335 | .{ 3, 4 }, | 342 | .{ 3, 4 }, |
| ... | @@ -552,6 +559,8 @@ test "@ptrCast single-item pointer to slice of bytes" { | ... | @@ -552,6 +559,8 @@ test "@ptrCast single-item pointer to slice of bytes" { |
| 552 | } | 559 | } |
| 553 | 560 | ||
| 554 | test "@ptrCast array pointer removing sentinel" { | 561 | test "@ptrCast array pointer removing sentinel" { |
| 562 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 563 | |||
| 555 | const in: *const [4:0]u8 = &.{ 1, 2, 3, 4 }; | 564 | const in: *const [4:0]u8 = &.{ 1, 2, 3, 4 }; |
| 556 | const out: []const i8 = @ptrCast(in); | 565 | const out: []const i8 = @ptrCast(in); |
| 557 | comptime assert(out.len == 4); | 566 | comptime assert(out.len == 4); |
| ... | @@ -562,6 +571,8 @@ test "@ptrCast array pointer removing sentinel" { | ... | @@ -562,6 +571,8 @@ test "@ptrCast array pointer removing sentinel" { |
| 562 | } | 571 | } |
| 563 | 572 | ||
| 564 | test "@ptrcast larger type to smaller one" { | 573 | test "@ptrcast larger type to smaller one" { |
| 574 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 575 | |||
| 565 | const T = packed struct { x: u17 }; | 576 | const T = packed struct { x: u17 }; |
| 566 | const a: u32 = 0; | 577 | const a: u32 = 0; |
| 567 | const b: *const T = @ptrCast(&a); | 578 | const b: *const T = @ptrCast(&a); |
test/behavior/saturating_arithmetic.zig+4| ... | @@ -362,6 +362,7 @@ test "saturating shl uses the LHS type" { | ... | @@ -362,6 +362,7 @@ test "saturating shl uses the LHS type" { |
| 362 | test "sat add > 128 bits" { | 362 | test "sat add > 128 bits" { |
| 363 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 363 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 364 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 364 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 365 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 365 | 366 | ||
| 366 | try testSatAdd(u140, 0, 0, 0); | 367 | try testSatAdd(u140, 0, 0, 0); |
| 367 | try testSatAdd(u140, maxInt(u140), 1, maxInt(u140)); | 368 | try testSatAdd(u140, maxInt(u140), 1, maxInt(u140)); |
| ... | @@ -377,6 +378,7 @@ test "sat add > 128 bits" { | ... | @@ -377,6 +378,7 @@ test "sat add > 128 bits" { |
| 377 | test "sat sub > 128 bits" { | 378 | test "sat sub > 128 bits" { |
| 378 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 379 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 379 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 380 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 381 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 380 | 382 | ||
| 381 | try testSatSub(u140, 0, 1, 0); | 383 | try testSatSub(u140, 0, 1, 0); |
| 382 | try testSatSub(u140, maxInt(u140), maxInt(u140), 0); | 384 | try testSatSub(u140, maxInt(u140), maxInt(u140), 0); |
| ... | @@ -392,6 +394,7 @@ test "sat sub > 128 bits" { | ... | @@ -392,6 +394,7 @@ test "sat sub > 128 bits" { |
| 392 | test "sat mul > 128 bits" { | 394 | test "sat mul > 128 bits" { |
| 393 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 395 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 394 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 396 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 397 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 395 | 398 | ||
| 396 | try testSatMul(u140, 0, maxInt(u140), 0); | 399 | try testSatMul(u140, 0, maxInt(u140), 0); |
| 397 | try testSatMul(u140, 1 << 70, 1 << 69, 1 << 139); | 400 | try testSatMul(u140, 1 << 70, 1 << 69, 1 << 139); |
| ... | @@ -407,6 +410,7 @@ test "sat mul > 128 bits" { | ... | @@ -407,6 +410,7 @@ test "sat mul > 128 bits" { |
| 407 | test "sat shl > 128 bits" { | 410 | test "sat shl > 128 bits" { |
| 408 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 411 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 409 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 412 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 413 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 410 | 414 | ||
| 411 | try testSatShl(u140, 0, u8, 17, 0); | 415 | try testSatShl(u140, 0, u8, 17, 0); |
| 412 | try testSatShl(u140, 1 << 100, u8, 20, 1 << 120); | 416 | try testSatShl(u140, 1 << 100, u8, 20, 1 << 120); |
test/behavior/sizeof_and_typeof.zig+1-1| ... | @@ -340,7 +340,7 @@ const exp = struct { | ... | @@ -340,7 +340,7 @@ const exp = struct { |
| 340 | } | 340 | } |
| 341 | }; | 341 | }; |
| 342 | comptime { | 342 | comptime { |
| 343 | _ = exp; | 343 | if (builtin.zig_backend != .stage2_spirv) _ = exp; |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | test "Extern function calls in @TypeOf" { | 346 | test "Extern function calls in @TypeOf" { |
test/behavior/slice.zig+14| ... | @@ -67,6 +67,7 @@ test "comptime slice of undefined pointer of length 0" { | ... | @@ -67,6 +67,7 @@ test "comptime slice of undefined pointer of length 0" { |
| 67 | 67 | ||
| 68 | test "implicitly cast array of size 0 to slice" { | 68 | test "implicitly cast array of size 0 to slice" { |
| 69 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 69 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 70 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 70 | 71 | ||
| 71 | var msg = [_]u8{}; | 72 | var msg = [_]u8{}; |
| 72 | try assertLenIsZero(&msg); | 73 | try assertLenIsZero(&msg); |
| ... | @@ -172,6 +173,7 @@ test "pass a slice of types to a function" { | ... | @@ -172,6 +173,7 @@ test "pass a slice of types to a function" { |
| 172 | 173 | ||
| 173 | test "generic malloc free" { | 174 | test "generic malloc free" { |
| 174 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 175 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 176 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 175 | 177 | ||
| 176 | const a = memAlloc(u8, 10) catch unreachable; | 178 | const a = memAlloc(u8, 10) catch unreachable; |
| 177 | memFree(u8, a); | 179 | memFree(u8, a); |
| ... | @@ -210,6 +212,8 @@ test "comptime slice of pointer preserves comptime var" { | ... | @@ -210,6 +212,8 @@ test "comptime slice of pointer preserves comptime var" { |
| 210 | } | 212 | } |
| 211 | 213 | ||
| 212 | test "comptime pointer cast array and then slice" { | 214 | test "comptime pointer cast array and then slice" { |
| 215 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 216 | |||
| 213 | const array = [_]u8{ 1, 2, 3, 4, 5, 6, 7, 8 }; | 217 | const array = [_]u8{ 1, 2, 3, 4, 5, 6, 7, 8 }; |
| 214 | 218 | ||
| 215 | const ptrA: [*]const u8 = @as([*]const u8, @ptrCast(&array)); | 219 | const ptrA: [*]const u8 = @as([*]const u8, @ptrCast(&array)); |
| ... | @@ -276,6 +280,7 @@ test "slice string literal has correct type" { | ... | @@ -276,6 +280,7 @@ test "slice string literal has correct type" { |
| 276 | 280 | ||
| 277 | test "result location zero sized array inside struct field implicit cast to slice" { | 281 | test "result location zero sized array inside struct field implicit cast to slice" { |
| 278 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 282 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 283 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 279 | 284 | ||
| 280 | const E = struct { | 285 | const E = struct { |
| 281 | entries: []u32, | 286 | entries: []u32, |
| ... | @@ -382,6 +387,8 @@ test "obtaining a null terminated slice" { | ... | @@ -382,6 +387,8 @@ test "obtaining a null terminated slice" { |
| 382 | } | 387 | } |
| 383 | 388 | ||
| 384 | test "empty array to slice" { | 389 | test "empty array to slice" { |
| 390 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 391 | |||
| 385 | const S = struct { | 392 | const S = struct { |
| 386 | fn doTheTest() !void { | 393 | fn doTheTest() !void { |
| 387 | const empty: []align(16) u8 = &[_]u8{}; | 394 | const empty: []align(16) u8 = &[_]u8{}; |
| ... | @@ -786,6 +793,8 @@ test "slice bounds in comptime concatenation" { | ... | @@ -786,6 +793,8 @@ test "slice bounds in comptime concatenation" { |
| 786 | } | 793 | } |
| 787 | 794 | ||
| 788 | test "slice sentinel access at comptime" { | 795 | test "slice sentinel access at comptime" { |
| 796 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 797 | |||
| 789 | { | 798 | { |
| 790 | const str0 = &[_:0]u8{ '1', '2', '3' }; | 799 | const str0 = &[_:0]u8{ '1', '2', '3' }; |
| 791 | const slice0: [:0]const u8 = str0; | 800 | const slice0: [:0]const u8 = str0; |
| ... | @@ -852,6 +861,8 @@ test "slice len modification at comptime" { | ... | @@ -852,6 +861,8 @@ test "slice len modification at comptime" { |
| 852 | } | 861 | } |
| 853 | 862 | ||
| 854 | test "slice field ptr const" { | 863 | test "slice field ptr const" { |
| 864 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 865 | |||
| 855 | const const_slice: []const u8 = "string"; | 866 | const const_slice: []const u8 = "string"; |
| 856 | 867 | ||
| 857 | const const_ptr_const_slice = &const_slice; | 868 | const const_ptr_const_slice = &const_slice; |
| ... | @@ -865,6 +876,7 @@ test "slice field ptr const" { | ... | @@ -865,6 +876,7 @@ test "slice field ptr const" { |
| 865 | 876 | ||
| 866 | test "slice field ptr var" { | 877 | test "slice field ptr var" { |
| 867 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 878 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 879 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 868 | 880 | ||
| 869 | var var_slice: []const u8 = "string"; | 881 | var var_slice: []const u8 = "string"; |
| 870 | 882 | ||
| ... | @@ -1050,6 +1062,8 @@ test "peer slices keep abi alignment with empty struct" { | ... | @@ -1050,6 +1062,8 @@ test "peer slices keep abi alignment with empty struct" { |
| 1050 | } | 1062 | } |
| 1051 | 1063 | ||
| 1052 | test "sentinel expression in slice operation has result type" { | 1064 | test "sentinel expression in slice operation has result type" { |
| 1065 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1066 | |||
| 1053 | const sentinel = std.math.maxInt(u16); | 1067 | const sentinel = std.math.maxInt(u16); |
| 1054 | 1068 | ||
| 1055 | const arr: [3]u16 = .{ 1, 2, sentinel }; | 1069 | const arr: [3]u16 = .{ 1, 2, sentinel }; |
test/behavior/string_literals.zig+2| ... | @@ -84,6 +84,8 @@ test "string literal pointer sentinel" { | ... | @@ -84,6 +84,8 @@ test "string literal pointer sentinel" { |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | test "sentinel slice of string literal" { | 86 | test "sentinel slice of string literal" { |
| 87 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 88 | |||
| 87 | const string = "Hello!\x00World!"; | 89 | const string = "Hello!\x00World!"; |
| 88 | try std.testing.expect(@TypeOf(string) == *const [13:0]u8); | 90 | try std.testing.expect(@TypeOf(string) == *const [13:0]u8); |
| 89 | 91 |
test/behavior/struct.zig+12| ... | @@ -342,6 +342,7 @@ test "self-referencing struct via array member" { | ... | @@ -342,6 +342,7 @@ test "self-referencing struct via array member" { |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | test "empty struct method call" { | 344 | test "empty struct method call" { |
| 345 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 345 | const es = EmptyStruct{}; | 346 | const es = EmptyStruct{}; |
| 346 | try expect(es.method() == 1234); | 347 | try expect(es.method() == 1234); |
| 347 | } | 348 | } |
| ... | @@ -991,6 +992,7 @@ test "struct with 0-length union array field" { | ... | @@ -991,6 +992,7 @@ test "struct with 0-length union array field" { |
| 991 | } | 992 | } |
| 992 | 993 | ||
| 993 | test "packed struct with undefined initializers" { | 994 | test "packed struct with undefined initializers" { |
| 995 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 994 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 996 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 995 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 997 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 996 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 998 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -1645,6 +1647,8 @@ test "struct init with no result pointer sets field result types" { | ... | @@ -1645,6 +1647,8 @@ test "struct init with no result pointer sets field result types" { |
| 1645 | } | 1647 | } |
| 1646 | 1648 | ||
| 1647 | test "runtime side-effects in comptime-known struct init" { | 1649 | test "runtime side-effects in comptime-known struct init" { |
| 1650 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1651 | |||
| 1648 | var side_effects: u4 = 0; | 1652 | var side_effects: u4 = 0; |
| 1649 | const S = struct { a: u4, b: u4, c: u4, d: u4 }; | 1653 | const S = struct { a: u4, b: u4, c: u4, d: u4 }; |
| 1650 | const init = S{ | 1654 | const init = S{ |
| ... | @@ -1772,6 +1776,7 @@ test "circular dependency through pointer field of a struct" { | ... | @@ -1772,6 +1776,7 @@ test "circular dependency through pointer field of a struct" { |
| 1772 | } | 1776 | } |
| 1773 | 1777 | ||
| 1774 | test "field calls do not force struct field init resolution" { | 1778 | test "field calls do not force struct field init resolution" { |
| 1779 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1775 | const S = struct { | 1780 | const S = struct { |
| 1776 | x: u32 = blk: { | 1781 | x: u32 = blk: { |
| 1777 | _ = @TypeOf(make().dummyFn()); // runtime field call - S not fully resolved - dummyFn call should not force field init resolution | 1782 | _ = @TypeOf(make().dummyFn()); // runtime field call - S not fully resolved - dummyFn call should not force field init resolution |
| ... | @@ -1921,6 +1926,7 @@ test "runtime value in nested initializer passed as pointer to function" { | ... | @@ -1921,6 +1926,7 @@ test "runtime value in nested initializer passed as pointer to function" { |
| 1921 | } | 1926 | } |
| 1922 | 1927 | ||
| 1923 | test "struct field default value is a call" { | 1928 | test "struct field default value is a call" { |
| 1929 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1924 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1930 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1925 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1931 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1926 | 1932 | ||
| ... | @@ -2182,6 +2188,7 @@ test "pass a pointer to a comptime-only struct field to a function" { | ... | @@ -2182,6 +2188,7 @@ test "pass a pointer to a comptime-only struct field to a function" { |
| 2182 | } | 2188 | } |
| 2183 | 2189 | ||
| 2184 | test "overaligned extern struct fields" { | 2190 | test "overaligned extern struct fields" { |
| 2191 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2185 | const A = struct { | 2192 | const A = struct { |
| 2186 | a: *anyopaque, | 2193 | a: *anyopaque, |
| 2187 | b: u64, | 2194 | b: u64, |
| ... | @@ -2231,6 +2238,7 @@ test "overaligned extern struct fields" { | ... | @@ -2231,6 +2238,7 @@ test "overaligned extern struct fields" { |
| 2231 | } | 2238 | } |
| 2232 | 2239 | ||
| 2233 | test "runtime-known slice of comptime-only struct" { | 2240 | test "runtime-known slice of comptime-only struct" { |
| 2241 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2234 | const Mixed = struct { index: u32, T: type }; | 2242 | const Mixed = struct { index: u32, T: type }; |
| 2235 | 2243 | ||
| 2236 | const static = struct { | 2244 | const static = struct { |
| ... | @@ -2252,6 +2260,7 @@ test "runtime-known slice of comptime-only struct" { | ... | @@ -2252,6 +2260,7 @@ test "runtime-known slice of comptime-only struct" { |
| 2252 | } | 2260 | } |
| 2253 | 2261 | ||
| 2254 | test "struct contains aligned pointer to itself through type decl" { | 2262 | test "struct contains aligned pointer to itself through type decl" { |
| 2263 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2255 | const Slab = struct { | 2264 | const Slab = struct { |
| 2256 | const Ptr = *align(64) const @This(); | 2265 | const Ptr = *align(64) const @This(); |
| 2257 | next: Ptr, | 2266 | next: Ptr, |
| ... | @@ -2269,6 +2278,7 @@ test "struct contains aligned pointer to itself through type decl" { | ... | @@ -2269,6 +2278,7 @@ test "struct contains aligned pointer to itself through type decl" { |
| 2269 | } | 2278 | } |
| 2270 | 2279 | ||
| 2271 | test "struct contains underaligned field with overaligned pointer to itself" { | 2280 | test "struct contains underaligned field with overaligned pointer to itself" { |
| 2281 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2272 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 2282 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 2273 | const S = struct { | 2283 | const S = struct { |
| 2274 | ptr: *align(8) @This() align(1), | 2284 | ptr: *align(8) @This() align(1), |
| ... | @@ -2281,6 +2291,7 @@ test "struct contains underaligned field with overaligned pointer to itself" { | ... | @@ -2281,6 +2291,7 @@ test "struct contains underaligned field with overaligned pointer to itself" { |
| 2281 | } | 2291 | } |
| 2282 | 2292 | ||
| 2283 | test "struct contains pointer to function accepting that struct" { | 2293 | test "struct contains pointer to function accepting that struct" { |
| 2294 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2284 | const S = struct { | 2295 | const S = struct { |
| 2285 | const FnPtr = ?*const fn (@This()) void; | 2296 | const FnPtr = ?*const fn (@This()) void; |
| 2286 | fn_ptr: FnPtr, | 2297 | fn_ptr: FnPtr, |
| ... | @@ -2303,6 +2314,7 @@ test "struct queries typeinfo of struct containing pointer back to first struct" | ... | @@ -2303,6 +2314,7 @@ test "struct queries typeinfo of struct containing pointer back to first struct" |
| 2303 | } | 2314 | } |
| 2304 | 2315 | ||
| 2305 | test "pointer to runtime field of struct containing struct containing comptime-only optional" { | 2316 | test "pointer to runtime field of struct containing struct containing comptime-only optional" { |
| 2317 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2306 | const Foo = struct { | 2318 | const Foo = struct { |
| 2307 | padding: struct { a: u8, b: ?comptime_int }, | 2319 | padding: struct { a: u8, b: ?comptime_int }, |
| 2308 | number: u8, | 2320 | number: u8, |
test/behavior/switch.zig+23| ... | @@ -276,6 +276,7 @@ test "switch prong with variable" { | ... | @@ -276,6 +276,7 @@ test "switch prong with variable" { |
| 276 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 276 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 277 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 277 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 278 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 278 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 279 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 279 | 280 | ||
| 280 | try switchProngWithVarFn(SwitchProngWithVarEnum{ .One = 13 }); | 281 | try switchProngWithVarFn(SwitchProngWithVarEnum{ .One = 13 }); |
| 281 | try switchProngWithVarFn(SwitchProngWithVarEnum{ .Two = 13.0 }); | 282 | try switchProngWithVarFn(SwitchProngWithVarEnum{ .Two = 13.0 }); |
| ... | @@ -299,6 +300,7 @@ fn switchProngWithVarFn(a: SwitchProngWithVarEnum) !void { | ... | @@ -299,6 +300,7 @@ fn switchProngWithVarFn(a: SwitchProngWithVarEnum) !void { |
| 299 | test "switch on enum using pointer capture" { | 300 | test "switch on enum using pointer capture" { |
| 300 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 301 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 301 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 302 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 303 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 302 | 304 | ||
| 303 | try testSwitchEnumPtrCapture(); | 305 | try testSwitchEnumPtrCapture(); |
| 304 | try comptime testSwitchEnumPtrCapture(); | 306 | try comptime testSwitchEnumPtrCapture(); |
| ... | @@ -359,6 +361,7 @@ fn testSwitchHandleAllCasesRange(x: u8) u8 { | ... | @@ -359,6 +361,7 @@ fn testSwitchHandleAllCasesRange(x: u8) u8 { |
| 359 | test "switch on union with some prongs capturing" { | 361 | test "switch on union with some prongs capturing" { |
| 360 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 362 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 361 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 363 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 364 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 362 | 365 | ||
| 363 | const X = union(enum) { | 366 | const X = union(enum) { |
| 364 | a, | 367 | a, |
| ... | @@ -395,6 +398,7 @@ test "switch on const enum with var" { | ... | @@ -395,6 +398,7 @@ test "switch on const enum with var" { |
| 395 | 398 | ||
| 396 | test "anon enum literal used in switch on union enum" { | 399 | test "anon enum literal used in switch on union enum" { |
| 397 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 400 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 401 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 398 | 402 | ||
| 399 | const Foo = union(enum) { | 403 | const Foo = union(enum) { |
| 400 | a: i32, | 404 | a: i32, |
| ... | @@ -576,6 +580,7 @@ test "switch with null and T peer types and inferred result location type" { | ... | @@ -576,6 +580,7 @@ test "switch with null and T peer types and inferred result location type" { |
| 576 | test "switch prongs with cases with identical payload types" { | 580 | test "switch prongs with cases with identical payload types" { |
| 577 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 581 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 578 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 582 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 583 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 579 | 584 | ||
| 580 | const Union = union(enum) { | 585 | const Union = union(enum) { |
| 581 | A: usize, | 586 | A: usize, |
| ... | @@ -617,6 +622,8 @@ test "switch prongs with cases with identical payload types" { | ... | @@ -617,6 +622,8 @@ test "switch prongs with cases with identical payload types" { |
| 617 | } | 622 | } |
| 618 | 623 | ||
| 619 | test "switch prong pointer capture alignment" { | 624 | test "switch prong pointer capture alignment" { |
| 625 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 626 | |||
| 620 | const U = union(enum) { | 627 | const U = union(enum) { |
| 621 | a: u8 align(8), | 628 | a: u8 align(8), |
| 622 | b: u8 align(4), | 629 | b: u8 align(4), |
| ... | @@ -840,6 +847,7 @@ test "switch capture peer type resolution" { | ... | @@ -840,6 +847,7 @@ test "switch capture peer type resolution" { |
| 840 | 847 | ||
| 841 | test "switch capture peer type resolution for in-memory coercible payloads" { | 848 | test "switch capture peer type resolution for in-memory coercible payloads" { |
| 842 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 849 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 850 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 843 | 851 | ||
| 844 | const T1 = c_int; | 852 | const T1 = c_int; |
| 845 | const t1_info = @typeInfo(T1).int; | 853 | const t1_info = @typeInfo(T1).int; |
| ... | @@ -863,6 +871,7 @@ test "switch capture peer type resolution for in-memory coercible payloads" { | ... | @@ -863,6 +871,7 @@ test "switch capture peer type resolution for in-memory coercible payloads" { |
| 863 | 871 | ||
| 864 | test "switch pointer capture peer type resolution" { | 872 | test "switch pointer capture peer type resolution" { |
| 865 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 873 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 874 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 866 | 875 | ||
| 867 | const T1 = c_int; | 876 | const T1 = c_int; |
| 868 | const t1_info = @typeInfo(T1).int; | 877 | const t1_info = @typeInfo(T1).int; |
| ... | @@ -968,6 +977,8 @@ test "switch prong captures range" { | ... | @@ -968,6 +977,8 @@ test "switch prong captures range" { |
| 968 | } | 977 | } |
| 969 | 978 | ||
| 970 | test "prong with inline call to unreachable" { | 979 | test "prong with inline call to unreachable" { |
| 980 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 981 | |||
| 971 | const U = union(enum) { | 982 | const U = union(enum) { |
| 972 | void: void, | 983 | void: void, |
| 973 | bool: bool, | 984 | bool: bool, |
| ... | @@ -1174,6 +1185,8 @@ test "switch with uninstantiable union fields" { | ... | @@ -1174,6 +1185,8 @@ test "switch with uninstantiable union fields" { |
| 1174 | } | 1185 | } |
| 1175 | 1186 | ||
| 1176 | test "switch with tag capture" { | 1187 | test "switch with tag capture" { |
| 1188 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1189 | |||
| 1177 | const U = union(enum) { | 1190 | const U = union(enum) { |
| 1178 | a, | 1191 | a, |
| 1179 | b: i32, | 1192 | b: i32, |
| ... | @@ -1307,6 +1320,8 @@ test "single-item prong in switch on enum has comptime-known capture" { | ... | @@ -1307,6 +1320,8 @@ test "single-item prong in switch on enum has comptime-known capture" { |
| 1307 | } | 1320 | } |
| 1308 | 1321 | ||
| 1309 | test "single range switch prong capture" { | 1322 | test "single range switch prong capture" { |
| 1323 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1324 | |||
| 1310 | const S = struct { | 1325 | const S = struct { |
| 1311 | fn doTheTest(x: u8) !void { | 1326 | fn doTheTest(x: u8) !void { |
| 1312 | switch (x) { | 1327 | switch (x) { |
| ... | @@ -1328,6 +1343,8 @@ test "single range switch prong capture" { | ... | @@ -1328,6 +1343,8 @@ test "single range switch prong capture" { |
| 1328 | } | 1343 | } |
| 1329 | 1344 | ||
| 1330 | test "switch on packed struct" { | 1345 | test "switch on packed struct" { |
| 1346 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1347 | |||
| 1331 | const P = packed struct { | 1348 | const P = packed struct { |
| 1332 | a: u1, | 1349 | a: u1, |
| 1333 | b: u1, | 1350 | b: u1, |
| ... | @@ -1358,6 +1375,8 @@ test "switch on packed struct" { | ... | @@ -1358,6 +1375,8 @@ test "switch on packed struct" { |
| 1358 | } | 1375 | } |
| 1359 | 1376 | ||
| 1360 | test "switch on packed union" { | 1377 | test "switch on packed union" { |
| 1378 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1379 | |||
| 1361 | const P = packed union(u2) { | 1380 | const P = packed union(u2) { |
| 1362 | a: u2, | 1381 | a: u2, |
| 1363 | b: i2, | 1382 | b: i2, |
| ... | @@ -1405,6 +1424,8 @@ test "switch on packed union" { | ... | @@ -1405,6 +1424,8 @@ test "switch on packed union" { |
| 1405 | } | 1424 | } |
| 1406 | 1425 | ||
| 1407 | test "switch on nested packed containers" { | 1426 | test "switch on nested packed containers" { |
| 1427 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1428 | |||
| 1408 | const P = packed struct { | 1429 | const P = packed struct { |
| 1409 | iu: u17, | 1430 | iu: u17, |
| 1410 | is: i31, | 1431 | is: i31, |
| ... | @@ -1458,6 +1479,8 @@ test "switch on nested packed containers" { | ... | @@ -1458,6 +1479,8 @@ test "switch on nested packed containers" { |
| 1458 | } | 1479 | } |
| 1459 | 1480 | ||
| 1460 | test "switch on large types" { | 1481 | test "switch on large types" { |
| 1482 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1483 | |||
| 1461 | const S = struct { | 1484 | const S = struct { |
| 1462 | fn doTheTest(a: u128, b: i500) !void { | 1485 | fn doTheTest(a: u128, b: i500) !void { |
| 1463 | switch (a) { | 1486 | switch (a) { |
test/behavior/switch_loop.zig+10| ... | @@ -397,6 +397,8 @@ test "switch loop on type with opv" { | ... | @@ -397,6 +397,8 @@ test "switch loop on type with opv" { |
| 397 | } | 397 | } |
| 398 | 398 | ||
| 399 | test "switch loop with tag capture" { | 399 | test "switch loop with tag capture" { |
| 400 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 401 | |||
| 400 | const U = union(enum) { | 402 | const U = union(enum) { |
| 401 | a, | 403 | a, |
| 402 | b: i32, | 404 | b: i32, |
| ... | @@ -467,6 +469,8 @@ test "switch loop with tag capture" { | ... | @@ -467,6 +469,8 @@ test "switch loop with tag capture" { |
| 467 | } | 469 | } |
| 468 | 470 | ||
| 469 | test "switch loop for error handling" { | 471 | test "switch loop for error handling" { |
| 472 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 473 | |||
| 470 | const Error = error{ MyError, MyOtherError }; | 474 | const Error = error{ MyError, MyOtherError }; |
| 471 | const S = struct { | 475 | const S = struct { |
| 472 | fn doTheTest() !void { | 476 | fn doTheTest() !void { |
| ... | @@ -511,6 +515,8 @@ test "switch loop for error handling" { | ... | @@ -511,6 +515,8 @@ test "switch loop for error handling" { |
| 511 | } | 515 | } |
| 512 | 516 | ||
| 513 | test "switch loop with packed structs" { | 517 | test "switch loop with packed structs" { |
| 518 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 519 | |||
| 514 | const P = packed struct { | 520 | const P = packed struct { |
| 515 | a: u7, | 521 | a: u7, |
| 516 | b: u20, | 522 | b: u20, |
| ... | @@ -528,6 +534,8 @@ test "switch loop with packed structs" { | ... | @@ -528,6 +534,8 @@ test "switch loop with packed structs" { |
| 528 | } | 534 | } |
| 529 | 535 | ||
| 530 | test "switch loop with packed unions" { | 536 | test "switch loop with packed unions" { |
| 537 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 538 | |||
| 531 | const P = packed union { | 539 | const P = packed union { |
| 532 | a: u7, | 540 | a: u7, |
| 533 | b: i7, | 541 | b: i7, |
| ... | @@ -566,6 +574,8 @@ test "switch loop with packed unions with OPV" { | ... | @@ -566,6 +574,8 @@ test "switch loop with packed unions with OPV" { |
| 566 | } | 574 | } |
| 567 | 575 | ||
| 568 | test "switch loop on large types" { | 576 | test "switch loop on large types" { |
| 577 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 578 | |||
| 569 | const S = struct { | 579 | const S = struct { |
| 570 | fn doTheTest(a: u128, b: i500) !void { | 580 | fn doTheTest(a: u128, b: i500) !void { |
| 571 | label: switch (a) { | 581 | label: switch (a) { |
test/behavior/switch_prong_err_enum.zig+1| ... | @@ -24,6 +24,7 @@ test "switch prong returns error enum" { | ... | @@ -24,6 +24,7 @@ test "switch prong returns error enum" { |
| 24 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 24 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 25 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 25 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 26 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 26 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 27 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 27 | 28 | ||
| 28 | switch (doThing(17) catch unreachable) { | 29 | switch (doThing(17) catch unreachable) { |
| 29 | FormValue.Address => |payload| { | 30 | FormValue.Address => |payload| { |
test/behavior/switch_prong_implicit_cast.zig+1| ... | @@ -18,6 +18,7 @@ test "switch prong implicit cast" { | ... | @@ -18,6 +18,7 @@ test "switch prong implicit cast" { |
| 18 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 18 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 19 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 19 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 20 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 20 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 21 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 21 | 22 | ||
| 22 | const result = switch (foo(2) catch unreachable) { | 23 | const result = switch (foo(2) catch unreachable) { |
| 23 | FormValue.One => false, | 24 | FormValue.One => false, |
test/behavior/truncate.zig+1| ... | @@ -50,6 +50,7 @@ fn testTruncate(comptime S: type, a: S, comptime D: type, expected: D) !void { | ... | @@ -50,6 +50,7 @@ fn testTruncate(comptime S: type, a: S, comptime D: type, expected: D) !void { |
| 50 | test "@truncate > 128 bits" { | 50 | test "@truncate > 128 bits" { |
| 51 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 51 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 52 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 52 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 53 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 53 | 54 | ||
| 54 | try testTruncate(u140, 0, u128, 0); | 55 | try testTruncate(u140, 0, u128, 0); |
| 55 | try testTruncate(u140, maxInt(u140), u128, maxInt(u128)); | 56 | try testTruncate(u140, maxInt(u140), u128, maxInt(u128)); |
test/behavior/tuple.zig+2| ... | @@ -559,6 +559,8 @@ test "OPV tuple fields aren't comptime" { | ... | @@ -559,6 +559,8 @@ test "OPV tuple fields aren't comptime" { |
| 559 | } | 559 | } |
| 560 | 560 | ||
| 561 | test "array of tuples that end with a zero-bit field followed by padding" { | 561 | test "array of tuples that end with a zero-bit field followed by padding" { |
| 562 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 563 | |||
| 562 | const S = struct { | 564 | const S = struct { |
| 563 | var foo: [2]struct { u32, u8, void } = .{ .{ 1, 2, {} }, .{ 3, 4, {} } }; | 565 | var foo: [2]struct { u32, u8, void } = .{ .{ 1, 2, {} }, .{ 3, 4, {} } }; |
| 564 | }; | 566 | }; |
test/behavior/type.zig+1| ... | @@ -277,6 +277,7 @@ test "Type.Union from empty Type.Enum" { | ... | @@ -277,6 +277,7 @@ test "Type.Union from empty Type.Enum" { |
| 277 | 277 | ||
| 278 | test "Type.Fn" { | 278 | test "Type.Fn" { |
| 279 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 279 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 280 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 280 | 281 | ||
| 281 | const some_opaque = opaque {}; | 282 | const some_opaque = opaque {}; |
| 282 | const some_ptr = *some_opaque; | 283 | const some_ptr = *some_opaque; |
test/behavior/type_info.zig+4| ... | @@ -310,6 +310,8 @@ const TestStruct = struct { | ... | @@ -310,6 +310,8 @@ const TestStruct = struct { |
| 310 | }; | 310 | }; |
| 311 | 311 | ||
| 312 | test "type info: packed struct info" { | 312 | test "type info: packed struct info" { |
| 313 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 314 | |||
| 313 | try testPackedStruct(); | 315 | try testPackedStruct(); |
| 314 | try comptime testPackedStruct(); | 316 | try comptime testPackedStruct(); |
| 315 | } | 317 | } |
| ... | @@ -594,6 +596,8 @@ test "value from struct @typeInfo default_value_ptr can be loaded at comptime" { | ... | @@ -594,6 +596,8 @@ test "value from struct @typeInfo default_value_ptr can be loaded at comptime" { |
| 594 | } | 596 | } |
| 595 | 597 | ||
| 596 | test "type info of tuple of string literal default value" { | 598 | test "type info of tuple of string literal default value" { |
| 599 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 600 | |||
| 597 | const struct_info = @typeInfo(@TypeOf(.{"hi"})).@"struct"; | 601 | const struct_info = @typeInfo(@TypeOf(.{"hi"})).@"struct"; |
| 598 | const struct_field_attrs = struct_info.field_attrs[0]; | 602 | const struct_field_attrs = struct_info.field_attrs[0]; |
| 599 | const struct_field_type = struct_info.field_types[0]; | 603 | const struct_field_type = struct_info.field_types[0]; |
test/behavior/union.zig+27| ... | @@ -31,6 +31,7 @@ test "init union with runtime value - floats" { | ... | @@ -31,6 +31,7 @@ test "init union with runtime value - floats" { |
| 31 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 31 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 32 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 32 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 33 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 33 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 34 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 34 | 35 | ||
| 35 | var foo: FooWithFloats = undefined; | 36 | var foo: FooWithFloats = undefined; |
| 36 | 37 | ||
| ... | @@ -407,6 +408,7 @@ test "tagged union with no payloads" { | ... | @@ -407,6 +408,7 @@ test "tagged union with no payloads" { |
| 407 | 408 | ||
| 408 | test "union with only 1 field casted to its enum type" { | 409 | test "union with only 1 field casted to its enum type" { |
| 409 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 410 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 411 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 410 | 412 | ||
| 411 | const Literal = union(enum) { | 413 | const Literal = union(enum) { |
| 412 | Number: f64, | 414 | Number: f64, |
| ... | @@ -443,6 +445,7 @@ var glbl: Foo1 = undefined; | ... | @@ -443,6 +445,7 @@ var glbl: Foo1 = undefined; |
| 443 | test "global union with single field is correctly initialized" { | 445 | test "global union with single field is correctly initialized" { |
| 444 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 446 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 445 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 447 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 448 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 446 | 449 | ||
| 447 | glbl = Foo1{ | 450 | glbl = Foo1{ |
| 448 | .f = @typeInfo(Foo1).@"union".field_types[0]{ .x = 123 }, | 451 | .f = @typeInfo(Foo1).@"union".field_types[0]{ .x = 123 }, |
| ... | @@ -485,6 +488,7 @@ test "update the tag value for zero-sized unions" { | ... | @@ -485,6 +488,7 @@ test "update the tag value for zero-sized unions" { |
| 485 | test "union initializer generates padding only if needed" { | 488 | test "union initializer generates padding only if needed" { |
| 486 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 489 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 487 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 490 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 491 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 488 | 492 | ||
| 489 | const U = union(enum) { | 493 | const U = union(enum) { |
| 490 | A: u24, | 494 | A: u24, |
| ... | @@ -550,6 +554,7 @@ const Baz = enum { A, B, C, D }; | ... | @@ -550,6 +554,7 @@ const Baz = enum { A, B, C, D }; |
| 550 | 554 | ||
| 551 | test "tagged union type" { | 555 | test "tagged union type" { |
| 552 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 556 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 557 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 553 | 558 | ||
| 554 | const foo1 = TaggedFoo{ .One = 13 }; | 559 | const foo1 = TaggedFoo{ .One = 13 }; |
| 555 | const foo2 = TaggedFoo{ | 560 | const foo2 = TaggedFoo{ |
| ... | @@ -654,6 +659,7 @@ fn testEnumWithSpecifiedAndUnspecifiedTagValues(x: MultipleChoice2) !void { | ... | @@ -654,6 +659,7 @@ fn testEnumWithSpecifiedAndUnspecifiedTagValues(x: MultipleChoice2) !void { |
| 654 | test "switch on union with only 1 field" { | 659 | test "switch on union with only 1 field" { |
| 655 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 660 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 656 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 661 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 662 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 657 | 663 | ||
| 658 | var r: PartialInst = undefined; | 664 | var r: PartialInst = undefined; |
| 659 | r = PartialInst.Compiled; | 665 | r = PartialInst.Compiled; |
| ... | @@ -682,6 +688,7 @@ const PartialInstWithPayload = union(enum) { | ... | @@ -682,6 +688,7 @@ const PartialInstWithPayload = union(enum) { |
| 682 | 688 | ||
| 683 | test "union with only 1 field casted to its enum type which has enum value specified" { | 689 | test "union with only 1 field casted to its enum type which has enum value specified" { |
| 684 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 690 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 691 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 685 | 692 | ||
| 686 | const Literal = union(enum) { | 693 | const Literal = union(enum) { |
| 687 | number: f64, | 694 | number: f64, |
| ... | @@ -706,6 +713,7 @@ test "union with only 1 field casted to its enum type which has enum value speci | ... | @@ -706,6 +713,7 @@ test "union with only 1 field casted to its enum type which has enum value speci |
| 706 | test "@intFromEnum works on unions" { | 713 | test "@intFromEnum works on unions" { |
| 707 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 714 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 708 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 715 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 716 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 709 | 717 | ||
| 710 | const Bar = union(enum) { | 718 | const Bar = union(enum) { |
| 711 | A: bool, | 719 | A: bool, |
| ... | @@ -765,6 +773,7 @@ test "return union init with void payload" { | ... | @@ -765,6 +773,7 @@ test "return union init with void payload" { |
| 765 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 773 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 766 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 774 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 767 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 775 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 776 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 768 | 777 | ||
| 769 | const S = struct { | 778 | const S = struct { |
| 770 | fn entry() !void { | 779 | fn entry() !void { |
| ... | @@ -789,6 +798,7 @@ test "@unionInit stored to a const" { | ... | @@ -789,6 +798,7 @@ test "@unionInit stored to a const" { |
| 789 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 798 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 790 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 799 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 791 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 800 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 801 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 792 | 802 | ||
| 793 | const S = struct { | 803 | const S = struct { |
| 794 | const U = union(enum) { | 804 | const U = union(enum) { |
| ... | @@ -818,6 +828,7 @@ test "@unionInit stored to a const" { | ... | @@ -818,6 +828,7 @@ test "@unionInit stored to a const" { |
| 818 | test "@unionInit can modify a union type" { | 828 | test "@unionInit can modify a union type" { |
| 819 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 829 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 820 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 830 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 831 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 821 | 832 | ||
| 822 | const UnionInitEnum = union(enum) { | 833 | const UnionInitEnum = union(enum) { |
| 823 | Boolean: bool, | 834 | Boolean: bool, |
| ... | @@ -840,6 +851,7 @@ test "@unionInit can modify a union type" { | ... | @@ -840,6 +851,7 @@ test "@unionInit can modify a union type" { |
| 840 | test "@unionInit can modify a pointer value" { | 851 | test "@unionInit can modify a pointer value" { |
| 841 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 852 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 842 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 853 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 854 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 843 | 855 | ||
| 844 | const UnionInitEnum = union(enum) { | 856 | const UnionInitEnum = union(enum) { |
| 845 | Boolean: bool, | 857 | Boolean: bool, |
| ... | @@ -914,6 +926,7 @@ test "function call result coerces from tagged union to the tag" { | ... | @@ -914,6 +926,7 @@ test "function call result coerces from tagged union to the tag" { |
| 914 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 926 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 915 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 927 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 916 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 928 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 929 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 917 | 930 | ||
| 918 | const S = struct { | 931 | const S = struct { |
| 919 | const Arch = union(enum) { | 932 | const Arch = union(enum) { |
| ... | @@ -948,6 +961,7 @@ test "function call result coerces from tagged union to the tag" { | ... | @@ -948,6 +961,7 @@ test "function call result coerces from tagged union to the tag" { |
| 948 | test "switching on non exhaustive union" { | 961 | test "switching on non exhaustive union" { |
| 949 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 962 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 950 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 963 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 964 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 951 | 965 | ||
| 952 | const S = struct { | 966 | const S = struct { |
| 953 | const E = enum(u8) { | 967 | const E = enum(u8) { |
| ... | @@ -1004,6 +1018,7 @@ test "containers with single-field enums" { | ... | @@ -1004,6 +1018,7 @@ test "containers with single-field enums" { |
| 1004 | test "@unionInit on union with u8 tag but no fields" { | 1018 | test "@unionInit on union with u8 tag but no fields" { |
| 1005 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1019 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1006 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1020 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1021 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1007 | 1022 | ||
| 1008 | const S = struct { | 1023 | const S = struct { |
| 1009 | const Type = enum(u8) { no_op = 105 }; | 1024 | const Type = enum(u8) { no_op = 105 }; |
| ... | @@ -1108,6 +1123,8 @@ test "union with a large struct field" { | ... | @@ -1108,6 +1123,8 @@ test "union with a large struct field" { |
| 1108 | } | 1123 | } |
| 1109 | 1124 | ||
| 1110 | test "comptime equality of extern unions with same tag" { | 1125 | test "comptime equality of extern unions with same tag" { |
| 1126 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1127 | |||
| 1111 | const S = struct { | 1128 | const S = struct { |
| 1112 | const U = extern union { | 1129 | const U = extern union { |
| 1113 | a: i32, | 1130 | a: i32, |
| ... | @@ -1126,6 +1143,7 @@ test "union tag is set when initiated as a temporary value at runtime" { | ... | @@ -1126,6 +1143,7 @@ test "union tag is set when initiated as a temporary value at runtime" { |
| 1126 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1143 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1127 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1144 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1128 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1145 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1146 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1129 | 1147 | ||
| 1130 | const U = union(enum) { | 1148 | const U = union(enum) { |
| 1131 | a, | 1149 | a, |
| ... | @@ -1165,6 +1183,7 @@ test "return an extern union from C calling convention" { | ... | @@ -1165,6 +1183,7 @@ test "return an extern union from C calling convention" { |
| 1165 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1183 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1166 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1184 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1167 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1185 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1186 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1168 | 1187 | ||
| 1169 | const namespace = struct { | 1188 | const namespace = struct { |
| 1170 | const S = extern struct { | 1189 | const S = extern struct { |
| ... | @@ -1246,6 +1265,7 @@ test "@unionInit uses tag value instead of field index" { | ... | @@ -1246,6 +1265,7 @@ test "@unionInit uses tag value instead of field index" { |
| 1246 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1265 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1247 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1266 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1248 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1267 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1268 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1249 | 1269 | ||
| 1250 | const E = enum(u8) { | 1270 | const E = enum(u8) { |
| 1251 | b = 255, | 1271 | b = 255, |
| ... | @@ -1303,6 +1323,7 @@ test "packed union in packed struct" { | ... | @@ -1303,6 +1323,7 @@ test "packed union in packed struct" { |
| 1303 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1323 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1304 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1324 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1305 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1325 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1326 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1306 | 1327 | ||
| 1307 | const S = packed struct { | 1328 | const S = packed struct { |
| 1308 | nested: packed union { | 1329 | nested: packed union { |
| ... | @@ -1374,6 +1395,7 @@ test "no dependency loop when function pointer in union returns the union" { | ... | @@ -1374,6 +1395,7 @@ test "no dependency loop when function pointer in union returns the union" { |
| 1374 | test "union reassignment can use previous value" { | 1395 | test "union reassignment can use previous value" { |
| 1375 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1396 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1376 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; | 1397 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 1398 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1377 | 1399 | ||
| 1378 | const U = union { | 1400 | const U = union { |
| 1379 | a: u32, | 1401 | a: u32, |
| ... | @@ -1386,6 +1408,7 @@ test "union reassignment can use previous value" { | ... | @@ -1386,6 +1408,7 @@ test "union reassignment can use previous value" { |
| 1386 | 1408 | ||
| 1387 | test "reinterpreting enum value inside packed union" { | 1409 | test "reinterpreting enum value inside packed union" { |
| 1388 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1410 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1411 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1389 | 1412 | ||
| 1390 | const U = packed union { | 1413 | const U = packed union { |
| 1391 | tag: enum(u8) { a, b }, | 1414 | tag: enum(u8) { a, b }, |
| ... | @@ -1864,6 +1887,7 @@ test "extern union initialized via reintepreted struct field initializer" { | ... | @@ -1864,6 +1887,7 @@ test "extern union initialized via reintepreted struct field initializer" { |
| 1864 | 1887 | ||
| 1865 | test "packed union initialized via reintepreted struct field initializer" { | 1888 | test "packed union initialized via reintepreted struct field initializer" { |
| 1866 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1889 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1890 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1867 | 1891 | ||
| 1868 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; | 1892 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; |
| 1869 | 1893 | ||
| ... | @@ -1909,6 +1933,7 @@ test "store of comptime reinterpreted memory to extern union" { | ... | @@ -1909,6 +1933,7 @@ test "store of comptime reinterpreted memory to extern union" { |
| 1909 | 1933 | ||
| 1910 | test "store of comptime reinterpreted memory to packed union" { | 1934 | test "store of comptime reinterpreted memory to packed union" { |
| 1911 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1935 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1936 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1912 | 1937 | ||
| 1913 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; | 1938 | const bytes = [_]u8{ 0xaa, 0xbb, 0xcc, 0xdd }; |
| 1914 | 1939 | ||
| ... | @@ -2256,6 +2281,8 @@ test "assign global tagged union" { | ... | @@ -2256,6 +2281,8 @@ test "assign global tagged union" { |
| 2256 | } | 2281 | } |
| 2257 | 2282 | ||
| 2258 | test "set mutable union by switching on same union" { | 2283 | test "set mutable union by switching on same union" { |
| 2284 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 2285 | |||
| 2259 | const U = union(enum) { | 2286 | const U = union(enum) { |
| 2260 | foo, | 2287 | foo, |
| 2261 | bar: usize, | 2288 | bar: usize, |
test/behavior/vector.zig+12| ... | @@ -8,6 +8,7 @@ const expectEqual = std.testing.expectEqual; | ... | @@ -8,6 +8,7 @@ const expectEqual = std.testing.expectEqual; |
| 8 | 8 | ||
| 9 | test "implicit cast vector to array - bool" { | 9 | test "implicit cast vector to array - bool" { |
| 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 11 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 11 | 12 | ||
| 12 | const S = struct { | 13 | const S = struct { |
| 13 | fn doTheTest() !void { | 14 | fn doTheTest() !void { |
| ... | @@ -30,6 +31,7 @@ test "implicit cast vector to array - bool" { | ... | @@ -30,6 +31,7 @@ test "implicit cast vector to array - bool" { |
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | test "implicit cast array to vector - bool" { | 33 | test "implicit cast array to vector - bool" { |
| 34 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 33 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 35 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 34 | 36 | ||
| 35 | const S = struct { | 37 | const S = struct { |
| ... | @@ -311,6 +313,7 @@ test "peer type resolution with coercible element types" { | ... | @@ -311,6 +313,7 @@ test "peer type resolution with coercible element types" { |
| 311 | } | 313 | } |
| 312 | 314 | ||
| 313 | test "tuple to vector" { | 315 | test "tuple to vector" { |
| 316 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 314 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 317 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 315 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 318 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 316 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 319 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -413,6 +416,7 @@ test "vector @splat" { | ... | @@ -413,6 +416,7 @@ test "vector @splat" { |
| 413 | } | 416 | } |
| 414 | 417 | ||
| 415 | test "load vector elements via comptime index" { | 418 | test "load vector elements via comptime index" { |
| 419 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 416 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 420 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 417 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 421 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 418 | 422 | ||
| ... | @@ -433,6 +437,7 @@ test "load vector elements via comptime index" { | ... | @@ -433,6 +437,7 @@ test "load vector elements via comptime index" { |
| 433 | } | 437 | } |
| 434 | 438 | ||
| 435 | test "store vector elements via comptime index" { | 439 | test "store vector elements via comptime index" { |
| 440 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 436 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 441 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 437 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 442 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 438 | 443 | ||
| ... | @@ -1223,6 +1228,7 @@ test "@subWithOverflow" { | ... | @@ -1223,6 +1228,7 @@ test "@subWithOverflow" { |
| 1223 | } | 1228 | } |
| 1224 | 1229 | ||
| 1225 | test "@mulWithOverflow" { | 1230 | test "@mulWithOverflow" { |
| 1231 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1226 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1232 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1227 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1233 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1228 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1234 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -1243,6 +1249,7 @@ test "@mulWithOverflow" { | ... | @@ -1243,6 +1249,7 @@ test "@mulWithOverflow" { |
| 1243 | } | 1249 | } |
| 1244 | 1250 | ||
| 1245 | test "@shlWithOverflow" { | 1251 | test "@shlWithOverflow" { |
| 1252 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1246 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1253 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1247 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1254 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1248 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1255 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -1371,6 +1378,7 @@ test "zero multiplicand" { | ... | @@ -1371,6 +1378,7 @@ test "zero multiplicand" { |
| 1371 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1378 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1372 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO | 1379 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO |
| 1373 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1380 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1381 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1374 | 1382 | ||
| 1375 | const zeros = @Vector(2, u32){ 0.0, 0.0 }; | 1383 | const zeros = @Vector(2, u32){ 0.0, 0.0 }; |
| 1376 | var ones = @Vector(2, u32){ 1.0, 1.0 }; | 1384 | var ones = @Vector(2, u32){ 1.0, 1.0 }; |
| ... | @@ -1413,6 +1421,7 @@ test "modRem with zero divisor" { | ... | @@ -1413,6 +1421,7 @@ test "modRem with zero divisor" { |
| 1413 | } | 1421 | } |
| 1414 | 1422 | ||
| 1415 | test "array operands to shuffle are coerced to vectors" { | 1423 | test "array operands to shuffle are coerced to vectors" { |
| 1424 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1416 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1425 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1417 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1426 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1418 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1427 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -1438,6 +1447,7 @@ test "load packed vector element" { | ... | @@ -1438,6 +1447,7 @@ test "load packed vector element" { |
| 1438 | } | 1447 | } |
| 1439 | 1448 | ||
| 1440 | test "store packed vector element" { | 1449 | test "store packed vector element" { |
| 1450 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1441 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1451 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1442 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1452 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1443 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1453 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| ... | @@ -1500,6 +1510,7 @@ test "store vector with memset" { | ... | @@ -1500,6 +1510,7 @@ test "store vector with memset" { |
| 1500 | } | 1510 | } |
| 1501 | 1511 | ||
| 1502 | test "addition of vectors represented as strings" { | 1512 | test "addition of vectors represented as strings" { |
| 1513 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1503 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1514 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1504 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1515 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1505 | 1516 | ||
| ... | @@ -1510,6 +1521,7 @@ test "addition of vectors represented as strings" { | ... | @@ -1510,6 +1521,7 @@ test "addition of vectors represented as strings" { |
| 1510 | } | 1521 | } |
| 1511 | 1522 | ||
| 1512 | test "compare vectors with different element types" { | 1523 | test "compare vectors with different element types" { |
| 1524 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 1513 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 1525 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1514 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1526 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1515 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1527 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
test/behavior/while.zig+2| ... | @@ -401,6 +401,8 @@ test "breaking from a loop in an if statement" { | ... | @@ -401,6 +401,8 @@ test "breaking from a loop in an if statement" { |
| 401 | } | 401 | } |
| 402 | 402 | ||
| 403 | test "labeled break from else" { | 403 | test "labeled break from else" { |
| 404 | if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; | ||
| 405 | |||
| 404 | const S = struct { | 406 | const S = struct { |
| 405 | fn doTheTest(x: u32) !void { | 407 | fn doTheTest(x: u32) !void { |
| 406 | const arr: []const u32 = &.{ 1, 3, 10 }; | 408 | const arr: []const u32 = &.{ 1, 3, 10 }; |