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