| author | |
| committer | |
| log | 075584a4d74276119372994d895bca747b1f861f |
| tree | e65bc1430aa8ef04941b7db70d4b750a4fb7b004 |
| parent | d9a8c779d8d7e251bcb549c4b1627508c012ee8c |
60 files changed, 4 insertions(+), 245 deletions(-)
src/codegen/spirv.zig+4-4| ... | ... | @@ -801,7 +801,7 @@ pub const DeclGen = struct { |
| 801 | 801 | } |
| 802 | 802 | } |
| 803 | 803 | |
| 804 | fn constantPtr(self: *DeclGen, ptr_ty: Type, ptr_val: Value) !IdRef { | |
| 804 | fn constantPtr(self: *DeclGen, ptr_ty: Type, ptr_val: Value) Error!IdRef { | |
| 805 | 805 | const result_ty_ref = try self.resolveType(ptr_ty, .direct); |
| 806 | 806 | const mod = self.module; |
| 807 | 807 | switch (mod.intern_pool.indexToKey(ptr_val.toIntern()).ptr.addr) { |
| ... | ... | @@ -1692,9 +1692,9 @@ pub const DeclGen = struct { |
| 1692 | 1692 | |
| 1693 | 1693 | .bitcast => try self.airBitCast(inst), |
| 1694 | 1694 | .intcast, .trunc => try self.airIntCast(inst), |
| 1695 | .int_from_ptr => try self.airIntFromPtr(inst), | |
| 1696 | .float_from_int => try self.airFloatFromInt(inst), | |
| 1697 | .int_from_float => try self.airIntFromFloat(inst), | |
| 1695 | .int_from_ptr => try self.airIntFromPtr(inst), | |
| 1696 | .float_from_int => try self.airFloatFromInt(inst), | |
| 1697 | .int_from_float => try self.airIntFromFloat(inst), | |
| 1698 | 1698 | .not => try self.airNot(inst), |
| 1699 | 1699 | |
| 1700 | 1700 | .array_to_slice => try self.airArrayToSlice(inst), |
test/behavior/alignof.zig-2| ... | ... | @@ -28,8 +28,6 @@ test "comparison of @alignOf(T) against zero" { |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | test "correct alignment for elements and slices of aligned array" { |
| 31 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 32 | ||
| 33 | 31 | var buf: [1024]u8 align(64) = undefined; |
| 34 | 32 | var start: usize = 1; |
| 35 | 33 | var end: usize = undefined; |
test/behavior/array.zig-5| ... | ... | @@ -158,7 +158,6 @@ test "array len field" { |
| 158 | 158 | test "array with sentinels" { |
| 159 | 159 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 160 | 160 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 161 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 162 | 161 | |
| 163 | 162 | const S = struct { |
| 164 | 163 | fn doTheTest(is_ct: bool) !void { |
| ... | ... | @@ -225,7 +224,6 @@ test "nested arrays of integers" { |
| 225 | 224 | test "implicit comptime in array type size" { |
| 226 | 225 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 227 | 226 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 228 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 229 | 227 | |
| 230 | 228 | var arr: [plusOne(10)]bool = undefined; |
| 231 | 229 | try expect(arr.len == 11); |
| ... | ... | @@ -318,7 +316,6 @@ test "read/write through global variable array of struct fields initialized via |
| 318 | 316 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 319 | 317 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 320 | 318 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 321 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 322 | 319 | |
| 323 | 320 | const S = struct { |
| 324 | 321 | fn doTheTest() !void { |
| ... | ... | @@ -358,7 +355,6 @@ fn testArrayByValAtComptime(b: [2]u8) u8 { |
| 358 | 355 | test "comptime evaluating function that takes array by value" { |
| 359 | 356 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 360 | 357 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 361 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 362 | 358 | |
| 363 | 359 | const arr = [_]u8{ 1, 2 }; |
| 364 | 360 | const x = comptime testArrayByValAtComptime(arr); |
| ... | ... | @@ -370,7 +366,6 @@ test "comptime evaluating function that takes array by value" { |
| 370 | 366 | test "runtime initialize array elem and then implicit cast to slice" { |
| 371 | 367 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 372 | 368 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 373 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 374 | 369 | |
| 375 | 370 | var two: i32 = 2; |
| 376 | 371 | const x: []const i32 = &[_]i32{two}; |
test/behavior/basic.zig-1| ... | ... | @@ -606,7 +606,6 @@ test "self reference through fn ptr field" { |
| 606 | 606 | |
| 607 | 607 | test "global variable initialized to global variable array element" { |
| 608 | 608 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 609 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 610 | 609 | |
| 611 | 610 | try expect(global_ptr == &gdt[0]); |
| 612 | 611 | } |
test/behavior/bugs/10138.zig-1| ... | ... | @@ -5,7 +5,6 @@ test "registers get overwritten when ignoring return" { |
| 5 | 5 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 6 | 6 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 7 | 7 | if (builtin.cpu.arch != .x86_64 or builtin.os.tag != .linux) return error.SkipZigTest; |
| 8 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 9 | 8 | |
| 10 | 9 | const fd = open(); |
| 11 | 10 | _ = write(fd, "a", 1); |
test/behavior/bugs/10970.zig-1| ... | ... | @@ -7,7 +7,6 @@ test "breaking from a loop in an if statement" { |
| 7 | 7 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 8 | 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 9 | 9 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 10 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 11 | 10 | |
| 12 | 11 | var cond = true; |
| 13 | 12 | const opt = while (cond) { |
test/behavior/bugs/11100.zig-2| ... | ... | @@ -9,7 +9,5 @@ pub fn do() bool { |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | test "bug" { |
| 12 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 13 | ||
| 14 | 12 | try std.testing.expect(!do()); |
| 15 | 13 | } |
test/behavior/bugs/11165.zig-2| ... | ... | @@ -2,7 +2,6 @@ const builtin = @import("builtin"); |
| 2 | 2 | |
| 3 | 3 | test "bytes" { |
| 4 | 4 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 5 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 6 | 5 | |
| 7 | 6 | const S = struct { |
| 8 | 7 | a: u32, |
| ... | ... | @@ -24,7 +23,6 @@ test "bytes" { |
| 24 | 23 | |
| 25 | 24 | test "aggregate" { |
| 26 | 25 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 27 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 28 | 26 | |
| 29 | 27 | const S = struct { |
| 30 | 28 | a: u32, |
test/behavior/bugs/11816.zig-1| ... | ... | @@ -4,7 +4,6 @@ const builtin = @import("builtin"); |
| 4 | 4 | test { |
| 5 | 5 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 6 | 6 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 7 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 8 | 7 | |
| 9 | 8 | var x: u32 = 3; |
| 10 | 9 | const val: usize = while (true) switch (x) { |
test/behavior/bugs/12025.zig-2| ... | ... | @@ -1,8 +1,6 @@ |
| 1 | 1 | const builtin = @import("builtin"); |
| 2 | 2 | |
| 3 | 3 | test { |
| 4 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 5 | ||
| 6 | 4 | comptime var st = .{ |
| 7 | 5 | .foo = &1, |
| 8 | 6 | .bar = &2, |
test/behavior/bugs/12033.zig-2| ... | ... | @@ -2,8 +2,6 @@ const std = @import("std"); |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | 3 | |
| 4 | 4 | test { |
| 5 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 6 | ||
| 7 | 5 | const string = "Hello!\x00World!"; |
| 8 | 6 | try std.testing.expect(@TypeOf(string) == *const [13:0]u8); |
| 9 | 7 |
test/behavior/bugs/12043.zig-2| ... | ... | @@ -7,8 +7,6 @@ fn foo(x: anytype) void { |
| 7 | 7 | ok = x; |
| 8 | 8 | } |
| 9 | 9 | test { |
| 10 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 11 | ||
| 12 | 10 | const x = &foo; |
| 13 | 11 | x(true); |
| 14 | 12 | try expect(ok); |
test/behavior/bugs/12119.zig-1| ... | ... | @@ -9,7 +9,6 @@ test { |
| 9 | 9 | if (builtin.zig_backend == .stage2_x86) return error.SkipZigTest; // TODO |
| 10 | 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 11 | 11 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 12 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 13 | 12 | |
| 14 | 13 | const zerox32: u8x32 = [_]u8{0} ** 32; |
| 15 | 14 | const bigsum: u32x8 = @as(u32x8, @bitCast(zerox32)); |
test/behavior/bugs/12891.zig-8| ... | ... | @@ -7,29 +7,21 @@ test "issue12891" { |
| 7 | 7 | try std.testing.expect(i < f); |
| 8 | 8 | } |
| 9 | 9 | test "nan" { |
| 10 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 11 | ||
| 12 | 10 | const f = comptime std.math.nan(f64); |
| 13 | 11 | var i: usize = 0; |
| 14 | 12 | try std.testing.expect(!(f < i)); |
| 15 | 13 | } |
| 16 | 14 | test "inf" { |
| 17 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 18 | ||
| 19 | 15 | const f = comptime std.math.inf(f64); |
| 20 | 16 | var i: usize = 0; |
| 21 | 17 | try std.testing.expect(f > i); |
| 22 | 18 | } |
| 23 | 19 | test "-inf < 0" { |
| 24 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 25 | ||
| 26 | 20 | const f = comptime -std.math.inf(f64); |
| 27 | 21 | var i: usize = 0; |
| 28 | 22 | try std.testing.expect(f < i); |
| 29 | 23 | } |
| 30 | 24 | test "inf >= 1" { |
| 31 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 32 | ||
| 33 | 25 | const f = comptime std.math.inf(f64); |
| 34 | 26 | var i: usize = 1; |
| 35 | 27 | try std.testing.expect(f >= i); |
test/behavior/bugs/12928.zig-4| ... | ... | @@ -11,8 +11,6 @@ const B = extern struct { |
| 11 | 11 | }; |
| 12 | 12 | |
| 13 | 13 | test { |
| 14 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 15 | ||
| 16 | 14 | var a: *A = undefined; |
| 17 | 15 | try expect(@TypeOf(&a.value.a) == *volatile u32); |
| 18 | 16 | try expect(@TypeOf(&a.value.b) == *volatile i32); |
| ... | ... | @@ -26,8 +24,6 @@ const D = extern union { |
| 26 | 24 | b: i32, |
| 27 | 25 | }; |
| 28 | 26 | test { |
| 29 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 30 | ||
| 31 | 27 | var c: *C = undefined; |
| 32 | 28 | try expect(@TypeOf(&c.value.a) == *volatile u32); |
| 33 | 29 | try expect(@TypeOf(&c.value.b) == *volatile i32); |
test/behavior/bugs/12984.zig-1| ... | ... | @@ -14,7 +14,6 @@ pub const CustomDraw = DeleagateWithContext(fn (?OnConfirm) void); |
| 14 | 14 | test "simple test" { |
| 15 | 15 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 16 | 16 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 17 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 18 | 17 | |
| 19 | 18 | var c: CustomDraw = undefined; |
| 20 | 19 | _ = c; |
test/behavior/bugs/13113.zig-1| ... | ... | @@ -10,7 +10,6 @@ test { |
| 10 | 10 | if (builtin.zig_backend == .stage2_x86) return error.SkipZigTest; // TODO |
| 11 | 11 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 12 | 12 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 13 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 14 | 13 | |
| 15 | 14 | const foo = Foo{ |
| 16 | 15 | .a = 1, |
test/behavior/bugs/13159.zig-1| ... | ... | @@ -11,7 +11,6 @@ const Bar = packed struct { |
| 11 | 11 | |
| 12 | 12 | test { |
| 13 | 13 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 14 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 15 | 14 | |
| 16 | 15 | var foo = Bar.Baz.fizz; |
| 17 | 16 | try expect(foo == .fizz); |
test/behavior/bugs/13285.zig-1| ... | ... | @@ -6,7 +6,6 @@ const Crasher = struct { |
| 6 | 6 | |
| 7 | 7 | test { |
| 8 | 8 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 9 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 10 | 9 | |
| 11 | 10 | var a: Crasher = undefined; |
| 12 | 11 | var crasher_ptr = &a; |
test/behavior/bugs/14854.zig-2| ... | ... | @@ -2,8 +2,6 @@ const testing = @import("std").testing; |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | 3 | |
| 4 | 4 | test { |
| 5 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 6 | ||
| 7 | 5 | try testing.expect(getGeneric(u8, getU8) == 123); |
| 8 | 6 | } |
| 9 | 7 |
test/behavior/bugs/1500.zig-2| ... | ... | @@ -6,8 +6,6 @@ const A = struct { |
| 6 | 6 | const B = *const fn (A) void; |
| 7 | 7 | |
| 8 | 8 | test "allow these dependencies" { |
| 9 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 10 | ||
| 11 | 9 | var a: A = undefined; |
| 12 | 10 | var b: B = undefined; |
| 13 | 11 | if (false) { |
test/behavior/bugs/15778.zig-2| ... | ... | @@ -6,7 +6,6 @@ test { |
| 6 | 6 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 7 | 7 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO |
| 8 | 8 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 9 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; // TODO | |
| 10 | 9 | const a = @Vector(0, i32){}; |
| 11 | 10 | const b = @Vector(0, i32){}; |
| 12 | 11 | _ = a + b; |
| ... | ... | @@ -18,7 +17,6 @@ test { |
| 18 | 17 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 19 | 18 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO |
| 20 | 19 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 21 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; // TODO | |
| 22 | 20 | const a = @Vector(0, f32){}; |
| 23 | 21 | const b = @Vector(0, f32){}; |
| 24 | 22 | _ = a - b; |
test/behavior/bugs/2622.zig-1| ... | ... | @@ -7,7 +7,6 @@ test "reslice of undefined global var slice" { |
| 7 | 7 | if (builtin.zig_backend == .stage2_x86) return error.SkipZigTest; // TODO |
| 8 | 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 9 | 9 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 10 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 11 | 10 | |
| 12 | 11 | var mem: [100]u8 = [_]u8{0} ** 100; |
| 13 | 12 | buf = &mem; |
test/behavior/bugs/3779.zig-2| ... | ... | @@ -8,7 +8,6 @@ const ptr_tag_name: [*:0]const u8 = tag_name; |
| 8 | 8 | test "@tagName() returns a string literal" { |
| 9 | 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 10 | 10 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 11 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 12 | 11 | |
| 13 | 12 | try std.testing.expect(*const [13:0]u8 == @TypeOf(tag_name)); |
| 14 | 13 | try std.testing.expect(std.mem.eql(u8, "TestEnumValue", tag_name)); |
| ... | ... | @@ -22,7 +21,6 @@ const ptr_error_name: [*:0]const u8 = error_name; |
| 22 | 21 | test "@errorName() returns a string literal" { |
| 23 | 22 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 24 | 23 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 25 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 26 | 24 | |
| 27 | 25 | try std.testing.expect(*const [13:0]u8 == @TypeOf(error_name)); |
| 28 | 26 | try std.testing.expect(std.mem.eql(u8, "TestErrorCode", error_name)); |
test/behavior/bugs/4954.zig-1| ... | ... | @@ -8,7 +8,6 @@ test "crash" { |
| 8 | 8 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 9 | 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 10 | 10 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 11 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 12 | 11 | |
| 13 | 12 | var buf: [4096]u8 = undefined; |
| 14 | 13 | f(&buf); |
test/behavior/bugs/5398.zig-1| ... | ... | @@ -22,7 +22,6 @@ test "assignment of field with padding" { |
| 22 | 22 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 23 | 23 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 24 | 24 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 25 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 26 | 25 | |
| 27 | 26 | renderable = Renderable{ |
| 28 | 27 | .mesh = Mesh{ .id = 0 }, |
test/behavior/bugs/6456.zig-1| ... | ... | @@ -13,7 +13,6 @@ const text = |
| 13 | 13 | test "issue 6456" { |
| 14 | 14 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 15 | 15 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 16 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 17 | 16 | |
| 18 | 17 | comptime { |
| 19 | 18 | var fields: []const StructField = &[0]StructField{}; |
test/behavior/bugs/656.zig-1| ... | ... | @@ -14,7 +14,6 @@ test "optional if after an if in a switch prong of a switch with 2 prongs in an |
| 14 | 14 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 15 | 15 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 16 | 16 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 17 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 18 | 17 | |
| 19 | 18 | try foo(false, true); |
| 20 | 19 | } |
test/behavior/bugs/7047.zig-2| ... | ... | @@ -15,8 +15,6 @@ fn S(comptime query: U) type { |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | test "compiler doesn't consider equal unions with different 'type' payload" { |
| 18 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 19 | ||
| 20 | 18 | const s1 = S(U{ .T = u32 }).tag(); |
| 21 | 19 | try std.testing.expectEqual(u32, s1); |
| 22 | 20 |
test/behavior/bugs/7187.zig-2| ... | ... | @@ -3,8 +3,6 @@ const builtin = @import("builtin"); |
| 3 | 3 | const expect = std.testing.expect; |
| 4 | 4 | |
| 5 | 5 | test "miscompilation with bool return type" { |
| 6 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 7 | ||
| 8 | 6 | var x: usize = 1; |
| 9 | 7 | var y: bool = getFalse(); |
| 10 | 8 | _ = y; |
test/behavior/bugs/8277.zig-2| ... | ... | @@ -2,8 +2,6 @@ const std = @import("std"); |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | 3 | |
| 4 | 4 | test "@sizeOf reified union zero-size payload fields" { |
| 5 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 6 | ||
| 7 | 5 | comptime { |
| 8 | 6 | try std.testing.expect(0 == @sizeOf(@Type(@typeInfo(union {})))); |
| 9 | 7 | try std.testing.expect(0 == @sizeOf(@Type(@typeInfo(union { a: void })))); |
test/behavior/bugs/828.zig-1| ... | ... | @@ -31,7 +31,6 @@ fn constCount(comptime cb: *const CountBy, comptime unused: u32) void { |
| 31 | 31 | |
| 32 | 32 | test "comptime struct return should not return the same instance" { |
| 33 | 33 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 34 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 35 | 34 | |
| 36 | 35 | //the first parameter must be passed by reference to trigger the bug |
| 37 | 36 | //a second parameter is required to trigger the bug |
test/behavior/byval_arg_var.zig-1| ... | ... | @@ -5,7 +5,6 @@ var result: []const u8 = "wrong"; |
| 5 | 5 | |
| 6 | 6 | test "pass string literal byvalue to a generic var param" { |
| 7 | 7 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 8 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 9 | 8 | |
| 10 | 9 | start(); |
| 11 | 10 | blowUpStack(10); |
test/behavior/call.zig-1| ... | ... | @@ -334,7 +334,6 @@ test "inline call preserves tail call" { |
| 334 | 334 | test "inline call doesn't re-evaluate non generic struct" { |
| 335 | 335 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 336 | 336 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 337 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 338 | 337 | |
| 339 | 338 | const S = struct { |
| 340 | 339 | fn foo(f: struct { a: u8, b: u8 }) !void { |
test/behavior/cast.zig-35| ... | ... | @@ -403,7 +403,6 @@ test "peer type unsigned int to signed" { |
| 403 | 403 | test "expected [*c]const u8, found [*:0]const u8" { |
| 404 | 404 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 405 | 405 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 406 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 407 | 406 | |
| 408 | 407 | var a: [*:0]const u8 = "hello"; |
| 409 | 408 | var b: [*c]const u8 = a; |
| ... | ... | @@ -445,7 +444,6 @@ test "implicitly cast from T to anyerror!?T" { |
| 445 | 444 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 446 | 445 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 447 | 446 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 448 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 449 | 447 | |
| 450 | 448 | try castToOptionalTypeError(1); |
| 451 | 449 | try comptime castToOptionalTypeError(1); |
| ... | ... | @@ -521,7 +519,6 @@ fn peerTypeEmptyArrayAndSliceAndError(a: bool, slice: []u8) anyerror![]u8 { |
| 521 | 519 | test "implicit cast from *const [N]T to []const T" { |
| 522 | 520 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 523 | 521 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 524 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 525 | 522 | |
| 526 | 523 | try testCastConstArrayRefToConstSlice(); |
| 527 | 524 | try comptime testCastConstArrayRefToConstSlice(); |
| ... | ... | @@ -547,7 +544,6 @@ fn testCastConstArrayRefToConstSlice() !void { |
| 547 | 544 | test "peer type resolution: error and [N]T" { |
| 548 | 545 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 549 | 546 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 550 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 551 | 547 | |
| 552 | 548 | try expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK")); |
| 553 | 549 | try comptime expect(mem.eql(u8, try testPeerErrorAndArray(0), "OK")); |
| ... | ... | @@ -709,7 +705,6 @@ test "peer type resolution: error set supersets" { |
| 709 | 705 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 710 | 706 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 711 | 707 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 712 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 713 | 708 | |
| 714 | 709 | const a: error{ One, Two } = undefined; |
| 715 | 710 | const b: error{One} = undefined; |
| ... | ... | @@ -739,7 +734,6 @@ test "peer type resolution: disjoint error sets" { |
| 739 | 734 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 740 | 735 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 741 | 736 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 742 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 743 | 737 | |
| 744 | 738 | const a: error{ One, Two } = undefined; |
| 745 | 739 | const b: error{Three} = undefined; |
| ... | ... | @@ -769,7 +763,6 @@ test "peer type resolution: error union and error set" { |
| 769 | 763 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 770 | 764 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 771 | 765 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 772 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 773 | 766 | |
| 774 | 767 | const a: error{Three} = undefined; |
| 775 | 768 | const b: error{ One, Two }!u32 = undefined; |
| ... | ... | @@ -803,7 +796,6 @@ test "peer type resolution: error union after non-error" { |
| 803 | 796 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 804 | 797 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 805 | 798 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 806 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 807 | 799 | |
| 808 | 800 | const a: u32 = undefined; |
| 809 | 801 | const b: error{ One, Two }!u32 = undefined; |
| ... | ... | @@ -863,7 +855,6 @@ test "peer cast *[0]T to []const T" { |
| 863 | 855 | |
| 864 | 856 | test "peer cast *[N]T to [*]T" { |
| 865 | 857 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 866 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 867 | 858 | |
| 868 | 859 | var array = [4:99]i32{ 1, 2, 3, 4 }; |
| 869 | 860 | var dest: [*]i32 = undefined; |
| ... | ... | @@ -930,7 +921,6 @@ test "peer cast [N:x]T to [N]T" { |
| 930 | 921 | test "peer cast *[N:x]T to *[N]T" { |
| 931 | 922 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 932 | 923 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 933 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 934 | 924 | |
| 935 | 925 | const S = struct { |
| 936 | 926 | fn doTheTest() !void { |
| ... | ... | @@ -946,7 +936,6 @@ test "peer cast *[N:x]T to *[N]T" { |
| 946 | 936 | test "peer cast [*:x]T to [*]T" { |
| 947 | 937 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 948 | 938 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 949 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 950 | 939 | |
| 951 | 940 | const S = struct { |
| 952 | 941 | fn doTheTest() !void { |
| ... | ... | @@ -967,7 +956,6 @@ test "peer cast [:x]T to [*:x]T" { |
| 967 | 956 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 968 | 957 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 969 | 958 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 970 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 971 | 959 | |
| 972 | 960 | const S = struct { |
| 973 | 961 | fn doTheTest() !void { |
| ... | ... | @@ -988,7 +976,6 @@ test "peer cast [:x]T to [*:x]T" { |
| 988 | 976 | test "peer type resolution implicit cast to return type" { |
| 989 | 977 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 990 | 978 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 991 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 992 | 979 | |
| 993 | 980 | const S = struct { |
| 994 | 981 | fn doTheTest() !void { |
| ... | ... | @@ -1009,7 +996,6 @@ test "peer type resolution implicit cast to return type" { |
| 1009 | 996 | test "peer type resolution implicit cast to variable type" { |
| 1010 | 997 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1011 | 998 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1012 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1013 | 999 | |
| 1014 | 1000 | const S = struct { |
| 1015 | 1001 | fn doTheTest() !void { |
| ... | ... | @@ -1034,7 +1020,6 @@ test "variable initialization uses result locations properly with regards to the |
| 1034 | 1020 | test "cast between C pointer with different but compatible types" { |
| 1035 | 1021 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1036 | 1022 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1037 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1038 | 1023 | |
| 1039 | 1024 | const S = struct { |
| 1040 | 1025 | fn foo(arg: [*]c_ushort) u16 { |
| ... | ... | @@ -1052,7 +1037,6 @@ test "cast between C pointer with different but compatible types" { |
| 1052 | 1037 | test "peer type resolve string lit with sentinel-terminated mutable slice" { |
| 1053 | 1038 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1054 | 1039 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1055 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1056 | 1040 | |
| 1057 | 1041 | var array: [4:0]u8 = undefined; |
| 1058 | 1042 | array[4] = 0; // TODO remove this when #4372 is solved |
| ... | ... | @@ -1062,8 +1046,6 @@ test "peer type resolve string lit with sentinel-terminated mutable slice" { |
| 1062 | 1046 | } |
| 1063 | 1047 | |
| 1064 | 1048 | test "peer type resolve array pointers, one of them const" { |
| 1065 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1066 | ||
| 1067 | 1049 | var array1: [4]u8 = undefined; |
| 1068 | 1050 | const array2: [5]u8 = undefined; |
| 1069 | 1051 | try comptime expect(@TypeOf(&array1, &array2) == []const u8); |
| ... | ... | @@ -1071,8 +1053,6 @@ test "peer type resolve array pointers, one of them const" { |
| 1071 | 1053 | } |
| 1072 | 1054 | |
| 1073 | 1055 | test "peer type resolve array pointer and unknown pointer" { |
| 1074 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1075 | ||
| 1076 | 1056 | const const_array: [4]u8 = undefined; |
| 1077 | 1057 | var array: [4]u8 = undefined; |
| 1078 | 1058 | var const_ptr: [*]const u8 = undefined; |
| ... | ... | @@ -1092,8 +1072,6 @@ test "peer type resolve array pointer and unknown pointer" { |
| 1092 | 1072 | } |
| 1093 | 1073 | |
| 1094 | 1074 | test "comptime float casts" { |
| 1095 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1096 | ||
| 1097 | 1075 | const a = @as(comptime_float, @floatFromInt(1)); |
| 1098 | 1076 | try expect(a == 1); |
| 1099 | 1077 | try expect(@TypeOf(a) == comptime_float); |
| ... | ... | @@ -1140,8 +1118,6 @@ fn incrementVoidPtrArray(array: ?*anyopaque, len: usize) void { |
| 1140 | 1118 | } |
| 1141 | 1119 | |
| 1142 | 1120 | test "compile time int to ptr of function" { |
| 1143 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1144 | ||
| 1145 | 1121 | try foobar(FUNCTION_CONSTANT); |
| 1146 | 1122 | } |
| 1147 | 1123 | |
| ... | ... | @@ -1341,8 +1317,6 @@ test "*const [N]null u8 to ?[]const u8" { |
| 1341 | 1317 | } |
| 1342 | 1318 | |
| 1343 | 1319 | test "cast between [*c]T and ?[*:0]T on fn parameter" { |
| 1344 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1345 | ||
| 1346 | 1320 | const S = struct { |
| 1347 | 1321 | const Handler = ?fn ([*c]const u8) callconv(.C) void; |
| 1348 | 1322 | fn addCallback(comptime handler: Handler) void { |
| ... | ... | @@ -1382,7 +1356,6 @@ test "cast between *[N]void and []void" { |
| 1382 | 1356 | test "peer resolve arrays of different size to const slice" { |
| 1383 | 1357 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1384 | 1358 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1385 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1386 | 1359 | |
| 1387 | 1360 | try expect(mem.eql(u8, boolToStr(true), "true")); |
| 1388 | 1361 | try expect(mem.eql(u8, boolToStr(false), "false")); |
| ... | ... | @@ -1486,7 +1459,6 @@ test "cast compatible optional types" { |
| 1486 | 1459 | test "coerce undefined single-item pointer of array to error union of slice" { |
| 1487 | 1460 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1488 | 1461 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1489 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1490 | 1462 | |
| 1491 | 1463 | const a = @as([*]u8, undefined)[0..0]; |
| 1492 | 1464 | var b: error{a}![]const u8 = a; |
| ... | ... | @@ -1496,7 +1468,6 @@ test "coerce undefined single-item pointer of array to error union of slice" { |
| 1496 | 1468 | |
| 1497 | 1469 | test "pointer to empty struct literal to mutable slice" { |
| 1498 | 1470 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1499 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1500 | 1471 | |
| 1501 | 1472 | var x: []i32 = &.{}; |
| 1502 | 1473 | try expect(x.len == 0); |
| ... | ... | @@ -1585,7 +1556,6 @@ test "bitcast packed struct with u0" { |
| 1585 | 1556 | |
| 1586 | 1557 | test "optional pointer coerced to optional allowzero pointer" { |
| 1587 | 1558 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1588 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1589 | 1559 | |
| 1590 | 1560 | var p: ?*u32 = undefined; |
| 1591 | 1561 | var q: ?*allowzero u32 = undefined; |
| ... | ... | @@ -1595,8 +1565,6 @@ test "optional pointer coerced to optional allowzero pointer" { |
| 1595 | 1565 | } |
| 1596 | 1566 | |
| 1597 | 1567 | test "single item pointer to pointer to array to slice" { |
| 1598 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1599 | ||
| 1600 | 1568 | var x: i32 = 1234; |
| 1601 | 1569 | try expect(@as([]const i32, @as(*[1]i32, &x))[0] == 1234); |
| 1602 | 1570 | const z1 = @as([]const i32, @as(*[1]i32, &x)); |
| ... | ... | @@ -1632,8 +1600,6 @@ test "@volatileCast without a result location" { |
| 1632 | 1600 | } |
| 1633 | 1601 | |
| 1634 | 1602 | test "coercion from single-item pointer to @as to slice" { |
| 1635 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1636 | ||
| 1637 | 1603 | var x: u32 = 1; |
| 1638 | 1604 | |
| 1639 | 1605 | // Why the following line gets a compile error? |
| ... | ... | @@ -2295,7 +2261,6 @@ test "cast builtins can wrap result in error union" { |
| 2295 | 2261 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 2296 | 2262 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 2297 | 2263 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 2298 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; // TODO | |
| 2299 | 2264 | |
| 2300 | 2265 | const S = struct { |
| 2301 | 2266 | const MyEnum = enum(u32) { _ }; |
test/behavior/cast_int.zig-1| ... | ... | @@ -19,7 +19,6 @@ test "coerce i8 to i32 and @intCast back" { |
| 19 | 19 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 20 | 20 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 21 | 21 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 22 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 23 | 22 | |
| 24 | 23 | var x: i8 = -5; |
| 25 | 24 | var y: i32 = -5; |
test/behavior/defer.zig-2| ... | ... | @@ -5,8 +5,6 @@ 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_spirv64) return error.SkipZigTest; | |
| 9 | ||
| 10 | 8 | testBreakContInDefer(10); |
| 11 | 9 | comptime testBreakContInDefer(10); |
| 12 | 10 | } |
test/behavior/empty_union.zig-3| ... | ... | @@ -9,8 +9,6 @@ test "switch on empty enum" { |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | test "switch on empty enum with a specified tag type" { |
| 12 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 13 | ||
| 14 | 12 | const E = enum(u8) {}; |
| 15 | 13 | var e: E = undefined; |
| 16 | 14 | switch (e) {} |
| ... | ... | @@ -18,7 +16,6 @@ test "switch on empty enum with a specified tag type" { |
| 18 | 16 | |
| 19 | 17 | test "switch on empty auto numbered tagged union" { |
| 20 | 18 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 21 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 22 | 19 | |
| 23 | 20 | const U = union(enum(u8)) {}; |
| 24 | 21 | var u: U = undefined; |
test/behavior/enum.zig-4| ... | ... | @@ -935,7 +935,6 @@ const Bar = enum { A, B, C, D }; |
| 935 | 935 | test "enum literal casting to error union with payload enum" { |
| 936 | 936 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 937 | 937 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 938 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 939 | 938 | |
| 940 | 939 | var bar: error{B}!Bar = undefined; |
| 941 | 940 | bar = .B; // should never cast to the error set |
| ... | ... | @@ -947,7 +946,6 @@ test "constant enum initialization with differing sizes" { |
| 947 | 946 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 948 | 947 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 949 | 948 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 950 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 951 | 949 | |
| 952 | 950 | try test3_1(test3_foo); |
| 953 | 951 | try test3_2(test3_bar); |
| ... | ... | @@ -1054,7 +1052,6 @@ test "enum literal casting to optional" { |
| 1054 | 1052 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 1055 | 1053 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1056 | 1054 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1057 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1058 | 1055 | |
| 1059 | 1056 | var bar: ?Bar = undefined; |
| 1060 | 1057 | bar = .B; |
| ... | ... | @@ -1141,7 +1138,6 @@ test "tag name functions are unique" { |
| 1141 | 1138 | test "size of enum with only one tag which has explicit integer tag type" { |
| 1142 | 1139 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 1143 | 1140 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1144 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1145 | 1141 | |
| 1146 | 1142 | const E = enum(u8) { nope = 10 }; |
| 1147 | 1143 | const S0 = struct { e: E }; |
test/behavior/error.zig-1| ... | ... | @@ -822,7 +822,6 @@ test "alignment of wrapping an error union payload" { |
| 822 | 822 | |
| 823 | 823 | test "compare error union and error set" { |
| 824 | 824 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 825 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 826 | 825 | |
| 827 | 826 | var a: anyerror = error.Foo; |
| 828 | 827 | var b: anyerror!u32 = error.Bar; |
test/behavior/eval.zig-35| ... | ... | @@ -5,8 +5,6 @@ const expect = std.testing.expect; |
| 5 | 5 | const expectEqual = std.testing.expectEqual; |
| 6 | 6 | |
| 7 | 7 | test "compile time recursion" { |
| 8 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 9 | ||
| 10 | 8 | try expect(some_data.len == 21); |
| 11 | 9 | } |
| 12 | 10 | var some_data: [@as(usize, @intCast(fibonacci(7)))]u8 = undefined; |
| ... | ... | @@ -74,7 +72,6 @@ fn constExprEvalOnSingleExprBlocksFn(x: i32, b: bool) i32 { |
| 74 | 72 | test "constant expressions" { |
| 75 | 73 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 76 | 74 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 77 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 78 | 75 | |
| 79 | 76 | var array: [array_size]u8 = undefined; |
| 80 | 77 | try expect(@sizeOf(@TypeOf(array)) == 20); |
| ... | ... | @@ -143,7 +140,6 @@ test "pointer to type" { |
| 143 | 140 | test "a type constructed in a global expression" { |
| 144 | 141 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 145 | 142 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 146 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 147 | 143 | |
| 148 | 144 | var l: List = undefined; |
| 149 | 145 | l.array[0] = 10; |
| ... | ... | @@ -202,8 +198,6 @@ test "@setEvalBranchQuota" { |
| 202 | 198 | } |
| 203 | 199 | |
| 204 | 200 | test "constant struct with negation" { |
| 205 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 206 | ||
| 207 | 201 | try expect(vertices[0].x == @as(f32, -0.6)); |
| 208 | 202 | } |
| 209 | 203 | const Vertex = struct { |
| ... | ... | @@ -308,8 +302,6 @@ fn performFn(comptime prefix_char: u8, start_value: i32) i32 { |
| 308 | 302 | } |
| 309 | 303 | |
| 310 | 304 | test "comptime iterate over fn ptr list" { |
| 311 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 312 | ||
| 313 | 305 | try expect(performFn('t', 1) == 6); |
| 314 | 306 | try expect(performFn('o', 0) == 1); |
| 315 | 307 | try expect(performFn('w', 99) == 99); |
| ... | ... | @@ -348,7 +340,6 @@ fn doesAlotT(comptime T: type, value: usize) T { |
| 348 | 340 | test "@setEvalBranchQuota at same scope as generic function call" { |
| 349 | 341 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 350 | 342 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 351 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 352 | 343 | |
| 353 | 344 | try expect(doesAlotT(u32, 2) == 2); |
| 354 | 345 | } |
| ... | ... | @@ -385,8 +376,6 @@ test "zero extend from u0 to u1" { |
| 385 | 376 | } |
| 386 | 377 | |
| 387 | 378 | test "return 0 from function that has u0 return type" { |
| 388 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 389 | ||
| 390 | 379 | const S = struct { |
| 391 | 380 | fn foo_zero() u0 { |
| 392 | 381 | return 0; |
| ... | ... | @@ -417,8 +406,6 @@ var st_init_str_foo = StInitStrFoo{ |
| 417 | 406 | }; |
| 418 | 407 | |
| 419 | 408 | test "inline for with same type but different values" { |
| 420 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 421 | ||
| 422 | 409 | var res: usize = 0; |
| 423 | 410 | inline for ([_]type{ [2]u8, [1]u8, [2]u8 }) |T| { |
| 424 | 411 | var a: T = undefined; |
| ... | ... | @@ -544,7 +531,6 @@ test "runtime 128 bit integer division" { |
| 544 | 531 | test "@tagName of @typeInfo" { |
| 545 | 532 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 546 | 533 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 547 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 548 | 534 | |
| 549 | 535 | const str = @tagName(@typeInfo(u8)); |
| 550 | 536 | try expect(std.mem.eql(u8, str, "Int")); |
| ... | ... | @@ -554,7 +540,6 @@ test "static eval list init" { |
| 554 | 540 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 555 | 541 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 556 | 542 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 557 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 558 | 543 | |
| 559 | 544 | try expect(static_vec3.data[2] == 1.0); |
| 560 | 545 | try expect(vec3(0.0, 0.0, 3.0).data[2] == 3.0); |
| ... | ... | @@ -586,7 +571,6 @@ test "inlined loop has array literal with elided runtime scope on first iteratio |
| 586 | 571 | test "ptr to local array argument at comptime" { |
| 587 | 572 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 588 | 573 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 589 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 590 | 574 | |
| 591 | 575 | comptime { |
| 592 | 576 | var bytes: [10]u8 = undefined; |
| ... | ... | @@ -623,7 +607,6 @@ const hi1 = "hi"; |
| 623 | 607 | const hi2 = hi1; |
| 624 | 608 | test "const global shares pointer with other same one" { |
| 625 | 609 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 626 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 627 | 610 | |
| 628 | 611 | try assertEqualPtrs(&hi1[0], &hi2[0]); |
| 629 | 612 | try comptime expect(&hi1[0] == &hi2[0]); |
| ... | ... | @@ -659,8 +642,6 @@ pub fn TypeWithCompTimeSlice(comptime field_name: []const u8) type { |
| 659 | 642 | } |
| 660 | 643 | |
| 661 | 644 | test "comptime function with mutable pointer is not memoized" { |
| 662 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 663 | ||
| 664 | 645 | comptime { |
| 665 | 646 | var x: i32 = 1; |
| 666 | 647 | const ptr = &x; |
| ... | ... | @@ -753,7 +734,6 @@ test "array concatenation of function calls" { |
| 753 | 734 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 754 | 735 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 755 | 736 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 756 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 757 | 737 | |
| 758 | 738 | var a = oneItem(3) ++ oneItem(4); |
| 759 | 739 | try expect(std.mem.eql(i32, &a, &[_]i32{ 3, 4 })); |
| ... | ... | @@ -763,7 +743,6 @@ test "array multiplication of function calls" { |
| 763 | 743 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 764 | 744 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 765 | 745 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 766 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 767 | 746 | |
| 768 | 747 | var a = oneItem(3) ** scalar(2); |
| 769 | 748 | try expect(std.mem.eql(i32, &a, &[_]i32{ 3, 3 })); |
| ... | ... | @@ -852,7 +831,6 @@ test "array multiplication sets the sentinel - value" { |
| 852 | 831 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 853 | 832 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 854 | 833 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 855 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 856 | 834 | |
| 857 | 835 | var a = [2:7]u3{ 1, 6 }; |
| 858 | 836 | var b = a ** 2; |
| ... | ... | @@ -869,7 +847,6 @@ test "array multiplication sets the sentinel - pointer" { |
| 869 | 847 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 870 | 848 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 871 | 849 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 872 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 873 | 850 | |
| 874 | 851 | var a = [2:7]u3{ 1, 6 }; |
| 875 | 852 | var b = &a ** 2; |
| ... | ... | @@ -1004,7 +981,6 @@ test "closure capture type of runtime-known var" { |
| 1004 | 981 | |
| 1005 | 982 | test "comptime break passing through runtime condition converted to runtime break" { |
| 1006 | 983 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1007 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1008 | 984 | |
| 1009 | 985 | const S = struct { |
| 1010 | 986 | fn doTheTest() !void { |
| ... | ... | @@ -1038,7 +1014,6 @@ test "comptime break to outer loop passing through runtime condition converted t |
| 1038 | 1014 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1039 | 1015 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1040 | 1016 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1041 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1042 | 1017 | |
| 1043 | 1018 | const S = struct { |
| 1044 | 1019 | fn doTheTest() !void { |
| ... | ... | @@ -1110,7 +1085,6 @@ test "comptime break operand passing through runtime switch converted to runtime |
| 1110 | 1085 | test "no dependency loop for alignment of self struct" { |
| 1111 | 1086 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1112 | 1087 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1113 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1114 | 1088 | |
| 1115 | 1089 | const S = struct { |
| 1116 | 1090 | fn doTheTest() !void { |
| ... | ... | @@ -1148,7 +1122,6 @@ test "no dependency loop for alignment of self struct" { |
| 1148 | 1122 | test "no dependency loop for alignment of self bare union" { |
| 1149 | 1123 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1150 | 1124 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1151 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1152 | 1125 | |
| 1153 | 1126 | const S = struct { |
| 1154 | 1127 | fn doTheTest() !void { |
| ... | ... | @@ -1186,7 +1159,6 @@ test "no dependency loop for alignment of self bare union" { |
| 1186 | 1159 | test "no dependency loop for alignment of self tagged union" { |
| 1187 | 1160 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1188 | 1161 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1189 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1190 | 1162 | |
| 1191 | 1163 | const S = struct { |
| 1192 | 1164 | fn doTheTest() !void { |
| ... | ... | @@ -1377,7 +1349,6 @@ test "lazy value is resolved as slice operand" { |
| 1377 | 1349 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1378 | 1350 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1379 | 1351 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1380 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1381 | 1352 | |
| 1382 | 1353 | const A = struct { a: u32 }; |
| 1383 | 1354 | var a: [512]u64 = undefined; |
| ... | ... | @@ -1435,7 +1406,6 @@ test "inline for inside a runtime condition" { |
| 1435 | 1406 | |
| 1436 | 1407 | test "continue in inline for inside a comptime switch" { |
| 1437 | 1408 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1438 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1439 | 1409 | |
| 1440 | 1410 | const arr = .{ 1, 2, 3 }; |
| 1441 | 1411 | var count: u8 = 0; |
| ... | ... | @@ -1501,7 +1471,6 @@ test "continue nested inline for loop in named block expr" { |
| 1501 | 1471 | |
| 1502 | 1472 | test "x and false is comptime-known false" { |
| 1503 | 1473 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1504 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1505 | 1474 | |
| 1506 | 1475 | const T = struct { |
| 1507 | 1476 | var x: u32 = 0; |
| ... | ... | @@ -1529,7 +1498,6 @@ test "x and false is comptime-known false" { |
| 1529 | 1498 | |
| 1530 | 1499 | test "x or true is comptime-known true" { |
| 1531 | 1500 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1532 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1533 | 1501 | |
| 1534 | 1502 | const T = struct { |
| 1535 | 1503 | var x: u32 = 0; |
| ... | ... | @@ -1559,7 +1527,6 @@ test "non-optional and optional array elements concatenated" { |
| 1559 | 1527 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1560 | 1528 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1561 | 1529 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1562 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1563 | 1530 | |
| 1564 | 1531 | const array = [1]u8{'A'} ++ [1]?u8{null}; |
| 1565 | 1532 | var index: usize = 0; |
| ... | ... | @@ -1648,8 +1615,6 @@ test "result of nested switch assigned to variable" { |
| 1648 | 1615 | } |
| 1649 | 1616 | |
| 1650 | 1617 | test "inline for loop of functions returning error unions" { |
| 1651 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1652 | ||
| 1653 | 1618 | const T1 = struct { |
| 1654 | 1619 | fn v() error{}!usize { |
| 1655 | 1620 | return 1; |
test/behavior/floatop.zig-3| ... | ... | @@ -736,7 +736,6 @@ test "@ceil" { |
| 736 | 736 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 737 | 737 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 738 | 738 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 739 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 740 | 739 | |
| 741 | 740 | try comptime testCeil(); |
| 742 | 741 | try testCeil(); |
| ... | ... | @@ -1053,7 +1052,6 @@ test "negation f128" { |
| 1053 | 1052 | test "eval @setFloatMode at compile-time" { |
| 1054 | 1053 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1055 | 1054 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1056 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1057 | 1055 | |
| 1058 | 1056 | const result = comptime fnWithFloatMode(); |
| 1059 | 1057 | try expect(result == 1234.0); |
| ... | ... | @@ -1089,7 +1087,6 @@ test "comptime fixed-width float non-zero divided by zero produces signed Inf" { |
| 1089 | 1087 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1090 | 1088 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1091 | 1089 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1092 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1093 | 1090 | |
| 1094 | 1091 | inline for (.{ f16, f32, f64, f80, f128 }) |F| { |
| 1095 | 1092 | const pos = @as(F, 1) / @as(F, 0); |
test/behavior/fn.zig-12| ... | ... | @@ -20,8 +20,6 @@ fn testLocVars(b: i32) void { |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | test "mutable local variables" { |
| 23 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 24 | ||
| 25 | 23 | var zero: i32 = 0; |
| 26 | 24 | try expect(zero == 0); |
| 27 | 25 | |
| ... | ... | @@ -53,8 +51,6 @@ test "weird function name" { |
| 53 | 51 | } |
| 54 | 52 | |
| 55 | 53 | test "assign inline fn to const variable" { |
| 56 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 57 | ||
| 58 | 54 | const a = inlineFn; |
| 59 | 55 | a(); |
| 60 | 56 | } |
| ... | ... | @@ -190,7 +186,6 @@ test "function with complex callconv and return type expressions" { |
| 190 | 186 | |
| 191 | 187 | test "pass by non-copying value" { |
| 192 | 188 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 193 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 194 | 189 | |
| 195 | 190 | try expect(addPointCoords(Point{ .x = 1, .y = 2 }) == 3); |
| 196 | 191 | } |
| ... | ... | @@ -218,7 +213,6 @@ fn addPointCoordsVar(pt: anytype) !i32 { |
| 218 | 213 | |
| 219 | 214 | test "pass by non-copying value as method" { |
| 220 | 215 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 221 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 222 | 216 | |
| 223 | 217 | var pt = Point2{ .x = 1, .y = 2 }; |
| 224 | 218 | try expect(pt.addPointCoords() == 3); |
| ... | ... | @@ -235,7 +229,6 @@ const Point2 = struct { |
| 235 | 229 | |
| 236 | 230 | test "pass by non-copying value as method, which is generic" { |
| 237 | 231 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 238 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 239 | 232 | |
| 240 | 233 | var pt = Point3{ .x = 1, .y = 2 }; |
| 241 | 234 | try expect(pt.addPointCoords(i32) == 3); |
| ... | ... | @@ -253,7 +246,6 @@ const Point3 = struct { |
| 253 | 246 | |
| 254 | 247 | test "pass by non-copying value as method, at comptime" { |
| 255 | 248 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 256 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 257 | 249 | |
| 258 | 250 | comptime { |
| 259 | 251 | var pt = Point2{ .x = 1, .y = 2 }; |
| ... | ... | @@ -396,8 +388,6 @@ test "function call with anon list literal - 2D" { |
| 396 | 388 | } |
| 397 | 389 | |
| 398 | 390 | test "ability to give comptime types and non comptime types to same parameter" { |
| 399 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 400 | ||
| 401 | 391 | const S = struct { |
| 402 | 392 | fn doTheTest() !void { |
| 403 | 393 | var x: i32 = 1; |
| ... | ... | @@ -415,8 +405,6 @@ test "ability to give comptime types and non comptime types to same parameter" { |
| 415 | 405 | } |
| 416 | 406 | |
| 417 | 407 | test "function with inferred error set but returning no error" { |
| 418 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 419 | ||
| 420 | 408 | const S = struct { |
| 421 | 409 | fn foo() !void {} |
| 422 | 410 | }; |
test/behavior/for.zig-4| ... | ... | @@ -257,7 +257,6 @@ test "for loop with else branch" { |
| 257 | 257 | test "count over fixed range" { |
| 258 | 258 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 259 | 259 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 260 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 261 | 260 | |
| 262 | 261 | var sum: usize = 0; |
| 263 | 262 | for (0..6) |i| { |
| ... | ... | @@ -270,7 +269,6 @@ test "count over fixed range" { |
| 270 | 269 | test "two counters" { |
| 271 | 270 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 272 | 271 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 273 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 274 | 272 | |
| 275 | 273 | var sum: usize = 0; |
| 276 | 274 | for (0..10, 10..20) |i, j| { |
| ... | ... | @@ -318,7 +316,6 @@ test "slice and two counters, one is offset and one is runtime" { |
| 318 | 316 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 319 | 317 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 320 | 318 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 321 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 322 | 319 | |
| 323 | 320 | const slice: []const u8 = "blah"; |
| 324 | 321 | var start: usize = 0; |
| ... | ... | @@ -406,7 +403,6 @@ test "inline for with slice as the comptime-known" { |
| 406 | 403 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 407 | 404 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 408 | 405 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 409 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 410 | 406 | |
| 411 | 407 | const comptime_slice = "hello"; |
| 412 | 408 | var runtime_i: usize = 3; |
test/behavior/generics.zig-14| ... | ... | @@ -55,7 +55,6 @@ test "fn with comptime args" { |
| 55 | 55 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 56 | 56 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 57 | 57 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 58 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 59 | 58 | |
| 60 | 59 | try expect(gimmeTheBigOne(1234, 5678) == 5678); |
| 61 | 60 | try expect(shouldCallSameInstance(34, 12) == 34); |
| ... | ... | @@ -66,7 +65,6 @@ test "anytype params" { |
| 66 | 65 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 67 | 66 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 68 | 67 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 69 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 70 | 68 | |
| 71 | 69 | try expect(max_i32(12, 34) == 34); |
| 72 | 70 | try expect(max_f64(1.2, 3.4) == 3.4); |
| ... | ... | @@ -91,7 +89,6 @@ fn max_f64(a: f64, b: f64) f64 { |
| 91 | 89 | test "type constructed by comptime function call" { |
| 92 | 90 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 93 | 91 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 94 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 95 | 92 | |
| 96 | 93 | var l: SimpleList(10) = undefined; |
| 97 | 94 | l.array[0] = 10; |
| ... | ... | @@ -115,7 +112,6 @@ test "function with return type type" { |
| 115 | 112 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 116 | 113 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 117 | 114 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 118 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 119 | 115 | |
| 120 | 116 | var list: List(i32) = undefined; |
| 121 | 117 | var list2: List(i32) = undefined; |
| ... | ... | @@ -147,8 +143,6 @@ fn GenericDataThing(comptime count: isize) type { |
| 147 | 143 | } |
| 148 | 144 | |
| 149 | 145 | test "use generic param in generic param" { |
| 150 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 151 | ||
| 152 | 146 | try expect(aGenericFn(i32, 3, 4) == 7); |
| 153 | 147 | } |
| 154 | 148 | fn aGenericFn(comptime T: type, comptime a: T, b: T) T { |
| ... | ... | @@ -178,7 +172,6 @@ test "generic fn keeps non-generic parameter types" { |
| 178 | 172 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 179 | 173 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 180 | 174 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 181 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 182 | 175 | |
| 183 | 176 | const A = 128; |
| 184 | 177 | |
| ... | ... | @@ -254,7 +247,6 @@ test "generic function instantiation turns into comptime call" { |
| 254 | 247 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 255 | 248 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 256 | 249 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 257 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 258 | 250 | |
| 259 | 251 | const S = struct { |
| 260 | 252 | fn doTheTest() !void { |
| ... | ... | @@ -305,7 +297,6 @@ test "generic function with void and comptime parameter" { |
| 305 | 297 | test "anonymous struct return type referencing comptime parameter" { |
| 306 | 298 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 307 | 299 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 308 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 309 | 300 | |
| 310 | 301 | const S = struct { |
| 311 | 302 | pub fn extraData(comptime T: type, index: usize) struct { data: T, end: usize } { |
| ... | ... | @@ -406,8 +397,6 @@ test "generic struct as parameter type" { |
| 406 | 397 | } |
| 407 | 398 | |
| 408 | 399 | test "slice as parameter type" { |
| 409 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 410 | ||
| 411 | 400 | const S = struct { |
| 412 | 401 | fn internComptimeString(comptime str: []const u8) *const []const u8 { |
| 413 | 402 | return &struct { |
| ... | ... | @@ -422,8 +411,6 @@ test "slice as parameter type" { |
| 422 | 411 | } |
| 423 | 412 | |
| 424 | 413 | test "null sentinel pointer passed as generic argument" { |
| 425 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 426 | ||
| 427 | 414 | const S = struct { |
| 428 | 415 | fn doTheTest(a: anytype) !void { |
| 429 | 416 | try std.testing.expect(@intFromPtr(a) == 8); |
| ... | ... | @@ -434,7 +421,6 @@ test "null sentinel pointer passed as generic argument" { |
| 434 | 421 | |
| 435 | 422 | test "generic function passed as comptime argument" { |
| 436 | 423 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 437 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 438 | 424 | |
| 439 | 425 | const S = struct { |
| 440 | 426 | fn doMath(comptime f: fn (type, i32, i32) error{Overflow}!i32, a: i32, b: i32) !void { |
test/behavior/inline_switch.zig-3| ... | ... | @@ -47,7 +47,6 @@ test "inline switch unions" { |
| 47 | 47 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 48 | 48 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 49 | 49 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 50 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 51 | 50 | |
| 52 | 51 | var x: U = .a; |
| 53 | 52 | switch (x) { |
| ... | ... | @@ -141,8 +140,6 @@ test "inline else int all values" { |
| 141 | 140 | } |
| 142 | 141 | |
| 143 | 142 | test "inline switch capture is set when switch operand is comptime known" { |
| 144 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 145 | ||
| 146 | 143 | const U2 = union(enum) { |
| 147 | 144 | a: u32, |
| 148 | 145 | }; |
test/behavior/math.zig-2| ... | ... | @@ -1145,8 +1145,6 @@ test "overflow arithmetic with u0 values" { |
| 1145 | 1145 | } |
| 1146 | 1146 | |
| 1147 | 1147 | test "allow signed integer division/remainder when values are comptime-known and positive or exact" { |
| 1148 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1149 | ||
| 1150 | 1148 | try expect(5 / 3 == 1); |
| 1151 | 1149 | try expect(-5 / -3 == 1); |
| 1152 | 1150 | try expect(-6 / 3 == -2); |
test/behavior/maximum_minimum.zig-2| ... | ... | @@ -200,7 +200,6 @@ test "@min/@max on comptime_int" { |
| 200 | 200 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 201 | 201 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 202 | 202 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 203 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; // TODO | |
| 204 | 203 | |
| 205 | 204 | const min = @min(1, 2, -2, -1); |
| 206 | 205 | const max = @max(1, 2, -2, -1); |
| ... | ... | @@ -257,7 +256,6 @@ test "@min/@max notices bounds from types when comptime-known value is undef" { |
| 257 | 256 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 258 | 257 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 259 | 258 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 260 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 261 | 259 | |
| 262 | 260 | var x: u32 = 1_000_000; |
| 263 | 261 | const y: u16 = undefined; |
test/behavior/slice.zig-1| ... | ... | @@ -754,7 +754,6 @@ test "slice len modification at comptime" { |
| 754 | 754 | } |
| 755 | 755 | |
| 756 | 756 | test "slice field ptr const" { |
| 757 | ||
| 758 | 757 | const const_slice: []const u8 = "string"; |
| 759 | 758 | |
| 760 | 759 | const const_ptr_const_slice = &const_slice; |
test/behavior/struct.zig-14| ... | ... | @@ -109,7 +109,6 @@ fn testMutation(foo: *StructFoo) void { |
| 109 | 109 | |
| 110 | 110 | test "struct byval assign" { |
| 111 | 111 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 112 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 113 | 112 | |
| 114 | 113 | var foo1: StructFoo = undefined; |
| 115 | 114 | var foo2: StructFoo = undefined; |
| ... | ... | @@ -129,8 +128,6 @@ test "call struct static method" { |
| 129 | 128 | const should_be_11 = StructWithNoFields.add(5, 6); |
| 130 | 129 | |
| 131 | 130 | test "invoke static method in global scope" { |
| 132 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 133 | ||
| 134 | 131 | try expect(should_be_11 == 11); |
| 135 | 132 | } |
| 136 | 133 | |
| ... | ... | @@ -255,7 +252,6 @@ test "usingnamespace within struct scope" { |
| 255 | 252 | test "struct field init with catch" { |
| 256 | 253 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 257 | 254 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 258 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 259 | 255 | |
| 260 | 256 | const S = struct { |
| 261 | 257 | fn doTheTest() !void { |
| ... | ... | @@ -367,8 +363,6 @@ test "self-referencing struct via array member" { |
| 367 | 363 | } |
| 368 | 364 | |
| 369 | 365 | test "empty struct method call" { |
| 370 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 371 | ||
| 372 | 366 | const es = EmptyStruct{}; |
| 373 | 367 | try expect(es.method() == 1234); |
| 374 | 368 | } |
| ... | ... | @@ -553,7 +547,6 @@ test "implicit cast packed struct field to const ptr" { |
| 553 | 547 | |
| 554 | 548 | test "zero-bit field in packed struct" { |
| 555 | 549 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 556 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 557 | 550 | |
| 558 | 551 | const S = packed struct { |
| 559 | 552 | x: u10, |
| ... | ... | @@ -949,8 +942,6 @@ test "tuple assigned to variable" { |
| 949 | 942 | } |
| 950 | 943 | |
| 951 | 944 | test "comptime struct field" { |
| 952 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 953 | ||
| 954 | 945 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 955 | 946 | if (comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; // TODO |
| 956 | 947 | |
| ... | ... | @@ -988,7 +979,6 @@ test "struct with union field" { |
| 988 | 979 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 989 | 980 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 990 | 981 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 991 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 992 | 982 | |
| 993 | 983 | const Value = struct { |
| 994 | 984 | ref: u32 = 2, |
| ... | ... | @@ -1439,8 +1429,6 @@ test "struct field has a pointer to an aligned version of itself" { |
| 1439 | 1429 | } |
| 1440 | 1430 | |
| 1441 | 1431 | test "struct has only one reference" { |
| 1442 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1443 | ||
| 1444 | 1432 | const S = struct { |
| 1445 | 1433 | fn optionalStructParam(_: ?struct { x: u8 }) void {} |
| 1446 | 1434 | fn errorUnionStructParam(_: error{}!struct { x: u8 }) void {} |
| ... | ... | @@ -1510,7 +1498,6 @@ test "discarded struct initialization works as expected" { |
| 1510 | 1498 | |
| 1511 | 1499 | test "function pointer in struct returns the struct" { |
| 1512 | 1500 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1513 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1514 | 1501 | |
| 1515 | 1502 | const A = struct { |
| 1516 | 1503 | const A = @This(); |
| ... | ... | @@ -1560,7 +1547,6 @@ test "optional field init with tuple" { |
| 1560 | 1547 | |
| 1561 | 1548 | test "if inside struct init inside if" { |
| 1562 | 1549 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1563 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1564 | 1550 | |
| 1565 | 1551 | const MyStruct = struct { x: u32 }; |
| 1566 | 1552 | const b: u32 = 5; |
test/behavior/switch.zig-10| ... | ... | @@ -232,7 +232,6 @@ test "switch prong with variable" { |
| 232 | 232 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 233 | 233 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 234 | 234 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 235 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 236 | 235 | |
| 237 | 236 | try switchProngWithVarFn(SwitchProngWithVarEnum{ .One = 13 }); |
| 238 | 237 | try switchProngWithVarFn(SwitchProngWithVarEnum{ .Two = 13.0 }); |
| ... | ... | @@ -257,7 +256,6 @@ test "switch on enum using pointer capture" { |
| 257 | 256 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 258 | 257 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 259 | 258 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 260 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 261 | 259 | |
| 262 | 260 | try testSwitchEnumPtrCapture(); |
| 263 | 261 | try comptime testSwitchEnumPtrCapture(); |
| ... | ... | @@ -318,7 +316,6 @@ test "switch on union with some prongs capturing" { |
| 318 | 316 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 319 | 317 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 320 | 318 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 321 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 322 | 319 | |
| 323 | 320 | const X = union(enum) { |
| 324 | 321 | a, |
| ... | ... | @@ -355,7 +352,6 @@ test "switch on const enum with var" { |
| 355 | 352 | test "anon enum literal used in switch on union enum" { |
| 356 | 353 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 357 | 354 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 358 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 359 | 355 | |
| 360 | 356 | const Foo = union(enum) { |
| 361 | 357 | a: i32, |
| ... | ... | @@ -394,7 +390,6 @@ fn switchWithUnreachable(x: i32) i32 { |
| 394 | 390 | |
| 395 | 391 | test "capture value of switch with all unreachable prongs" { |
| 396 | 392 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 397 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 398 | 393 | |
| 399 | 394 | const x = return_a_number() catch |err| switch (err) { |
| 400 | 395 | else => unreachable, |
| ... | ... | @@ -408,7 +403,6 @@ fn return_a_number() anyerror!i32 { |
| 408 | 403 | |
| 409 | 404 | test "switch on integer with else capturing expr" { |
| 410 | 405 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 411 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 412 | 406 | |
| 413 | 407 | const S = struct { |
| 414 | 408 | fn doTheTest() !void { |
| ... | ... | @@ -498,7 +492,6 @@ test "switch prongs with error set cases make a new error set type for capture v |
| 498 | 492 | |
| 499 | 493 | test "return result loc and then switch with range implicit casted to error union" { |
| 500 | 494 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 501 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 502 | 495 | |
| 503 | 496 | const S = struct { |
| 504 | 497 | fn doTheTest() !void { |
| ... | ... | @@ -539,7 +532,6 @@ test "switch prongs with cases with identical payload types" { |
| 539 | 532 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 540 | 533 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 541 | 534 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 542 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 543 | 535 | |
| 544 | 536 | const Union = union(enum) { |
| 545 | 537 | A: usize, |
| ... | ... | @@ -706,8 +698,6 @@ test "switch item sizeof" { |
| 706 | 698 | } |
| 707 | 699 | |
| 708 | 700 | test "comptime inline switch" { |
| 709 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 710 | ||
| 711 | 701 | const U = union(enum) { a: type, b: type }; |
| 712 | 702 | const value = comptime blk: { |
| 713 | 703 | var u: U = .{ .a = u32 }; |
test/behavior/this.zig-1| ... | ... | @@ -27,7 +27,6 @@ test "this refer to module call private fn" { |
| 27 | 27 | test "this refer to container" { |
| 28 | 28 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 29 | 29 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 30 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 31 | 30 | |
| 32 | 31 | var pt: Point(i32) = undefined; |
| 33 | 32 | pt.x = 12; |
test/behavior/try.zig-2| ... | ... | @@ -24,8 +24,6 @@ fn returnsTen() anyerror!i32 { |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | test "try without vars" { |
| 27 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 28 | ||
| 29 | 27 | const result1 = if (failIfTrue(true)) 1 else |_| @as(i32, 2); |
| 30 | 28 | try expect(result1 == 2); |
| 31 | 29 |
test/behavior/tuple.zig-3| ... | ... | @@ -289,7 +289,6 @@ test "coerce tuple to tuple" { |
| 289 | 289 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 290 | 290 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 291 | 291 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 292 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 293 | 292 | |
| 294 | 293 | const T = std.meta.Tuple(&.{u8}); |
| 295 | 294 | const S = struct { |
| ... | ... | @@ -304,7 +303,6 @@ test "tuple type with void field" { |
| 304 | 303 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 305 | 304 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 306 | 305 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 307 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 308 | 306 | |
| 309 | 307 | const T = std.meta.Tuple(&[_]type{void}); |
| 310 | 308 | const x = T{{}}; |
| ... | ... | @@ -343,7 +341,6 @@ test "zero sized struct in tuple handled correctly" { |
| 343 | 341 | test "tuple type with void field and a runtime field" { |
| 344 | 342 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 345 | 343 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 346 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 347 | 344 | |
| 348 | 345 | const T = std.meta.Tuple(&[_]type{ usize, void }); |
| 349 | 346 | var t: T = .{ 5, {} }; |
test/behavior/type_info.zig-5| ... | ... | @@ -160,7 +160,6 @@ test "type info: error set, error union info, anyerror" { |
| 160 | 160 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 161 | 161 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 162 | 162 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 163 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 164 | 163 | |
| 165 | 164 | try testErrorSet(); |
| 166 | 165 | try comptime testErrorSet(); |
| ... | ... | @@ -192,7 +191,6 @@ test "type info: error set single value" { |
| 192 | 191 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 193 | 192 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 194 | 193 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 195 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 196 | 194 | |
| 197 | 195 | const TestSet = error.One; |
| 198 | 196 | |
| ... | ... | @@ -206,7 +204,6 @@ test "type info: error set merged" { |
| 206 | 204 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 207 | 205 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 208 | 206 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 209 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 210 | 207 | |
| 211 | 208 | const TestSet = error{ One, Two } || error{Three}; |
| 212 | 209 | |
| ... | ... | @@ -222,7 +219,6 @@ test "type info: enum info" { |
| 222 | 219 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 223 | 220 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 224 | 221 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 225 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 226 | 222 | |
| 227 | 223 | try testEnum(); |
| 228 | 224 | try comptime testEnum(); |
| ... | ... | @@ -533,7 +529,6 @@ test "Struct.is_tuple for anon list literal" { |
| 533 | 529 | |
| 534 | 530 | test "Struct.is_tuple for anon struct literal" { |
| 535 | 531 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 536 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 537 | 532 | |
| 538 | 533 | const info = @typeInfo(@TypeOf(.{ .a = 0 })); |
| 539 | 534 | try expect(!info.Struct.is_tuple); |
test/behavior/undefined.zig-3| ... | ... | @@ -48,7 +48,6 @@ test "assign undefined to struct" { |
| 48 | 48 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 49 | 49 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 50 | 50 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 51 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 52 | 51 | |
| 53 | 52 | comptime { |
| 54 | 53 | var foo: Foo = undefined; |
| ... | ... | @@ -66,7 +65,6 @@ test "assign undefined to struct with method" { |
| 66 | 65 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 67 | 66 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 68 | 67 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 69 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 70 | 68 | |
| 71 | 69 | comptime { |
| 72 | 70 | var foo: Foo = undefined; |
| ... | ... | @@ -82,7 +80,6 @@ test "assign undefined to struct with method" { |
| 82 | 80 | |
| 83 | 81 | test "type name of undefined" { |
| 84 | 82 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 85 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 86 | 83 | |
| 87 | 84 | const x = undefined; |
| 88 | 85 | try expect(mem.eql(u8, @typeName(@TypeOf(x)), "@TypeOf(undefined)")); |
test/behavior/underscore.zig-1| ... | ... | @@ -8,7 +8,6 @@ test "ignore lval with underscore" { |
| 8 | 8 | |
| 9 | 9 | test "ignore lval with underscore (while loop)" { |
| 10 | 10 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 11 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 12 | 11 | |
| 13 | 12 | while (optionalReturnError()) |_| { |
| 14 | 13 | while (optionalReturnError()) |_| { |
test/behavior/union.zig-3| ... | ... | @@ -1160,7 +1160,6 @@ test "union with no result loc initiated with a runtime value" { |
| 1160 | 1160 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1161 | 1161 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1162 | 1162 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1163 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1164 | 1163 | |
| 1165 | 1164 | const U = union { |
| 1166 | 1165 | a: u32, |
| ... | ... | @@ -1177,7 +1176,6 @@ test "union with a large struct field" { |
| 1177 | 1176 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1178 | 1177 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1179 | 1178 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1180 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1181 | 1179 | |
| 1182 | 1180 | const S = struct { |
| 1183 | 1181 | a: [8]usize, |
| ... | ... | @@ -1329,7 +1327,6 @@ test "@unionInit uses tag value instead of field index" { |
| 1329 | 1327 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1330 | 1328 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1331 | 1329 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1332 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 1333 | 1330 | |
| 1334 | 1331 | const E = enum(u8) { |
| 1335 | 1332 | b = 255, |
test/behavior/vector.zig-2| ... | ... | @@ -240,7 +240,6 @@ test "peer type resolution with coercible element types" { |
| 240 | 240 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 241 | 241 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 242 | 242 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 243 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 244 | 243 | |
| 245 | 244 | const S = struct { |
| 246 | 245 | fn doTheTest() !void { |
| ... | ... | @@ -1469,7 +1468,6 @@ test "boolean vector with 2 or more booleans" { |
| 1469 | 1468 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1470 | 1469 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 1471 | 1470 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1472 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; // TODO | |
| 1473 | 1471 | |
| 1474 | 1472 | // TODO: try removing this after <https://github.com/ziglang/zig/issues/13782>: |
| 1475 | 1473 | if (!(builtin.os.tag == .linux and builtin.cpu.arch == .x86_64)) return; |
test/behavior/while.zig-15| ... | ... | @@ -50,8 +50,6 @@ test "while with continue expression" { |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | test "while with else" { |
| 53 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 54 | ||
| 55 | 53 | var sum: i32 = 0; |
| 56 | 54 | var i: i32 = 0; |
| 57 | 55 | var got_else: i32 = 0; |
| ... | ... | @@ -79,8 +77,6 @@ fn getNumberOrNull() ?i32 { |
| 79 | 77 | } |
| 80 | 78 | |
| 81 | 79 | test "continue outer while loop" { |
| 82 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 83 | ||
| 84 | 80 | testContinueOuter(); |
| 85 | 81 | comptime testContinueOuter(); |
| 86 | 82 | } |
| ... | ... | @@ -127,7 +123,6 @@ test "while copies its payload" { |
| 127 | 123 | |
| 128 | 124 | test "continue and break" { |
| 129 | 125 | if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest; |
| 130 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 131 | 126 | |
| 132 | 127 | try runContinueAndBreakTest(); |
| 133 | 128 | try expect(continue_and_break_counter == 8); |
| ... | ... | @@ -149,7 +144,6 @@ fn runContinueAndBreakTest() !void { |
| 149 | 144 | test "while with optional as condition" { |
| 150 | 145 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 151 | 146 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 152 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 153 | 147 | |
| 154 | 148 | numbers_left = 10; |
| 155 | 149 | var sum: i32 = 0; |
| ... | ... | @@ -162,7 +156,6 @@ test "while with optional as condition" { |
| 162 | 156 | test "while with optional as condition with else" { |
| 163 | 157 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 164 | 158 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 165 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 166 | 159 | |
| 167 | 160 | numbers_left = 10; |
| 168 | 161 | var sum: i32 = 0; |
| ... | ... | @@ -223,7 +216,6 @@ test "while on optional with else result follow break prong" { |
| 223 | 216 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 224 | 217 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 225 | 218 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 226 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 227 | 219 | |
| 228 | 220 | const result = while (returnOptional(10)) |value| { |
| 229 | 221 | break value; |
| ... | ... | @@ -251,8 +243,6 @@ fn returnTrue() bool { |
| 251 | 243 | } |
| 252 | 244 | |
| 253 | 245 | test "return with implicit cast from while loop" { |
| 254 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 255 | ||
| 256 | 246 | returnWithImplicitCastFromWhileLoopTest() catch unreachable; |
| 257 | 247 | } |
| 258 | 248 | fn returnWithImplicitCastFromWhileLoopTest() anyerror!void { |
| ... | ... | @@ -263,7 +253,6 @@ fn returnWithImplicitCastFromWhileLoopTest() anyerror!void { |
| 263 | 253 | |
| 264 | 254 | test "while on error union with else result follow else prong" { |
| 265 | 255 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 266 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 267 | 256 | |
| 268 | 257 | const result = while (returnError()) |value| { |
| 269 | 258 | break value; |
| ... | ... | @@ -273,7 +262,6 @@ test "while on error union with else result follow else prong" { |
| 273 | 262 | |
| 274 | 263 | test "while on error union with else result follow break prong" { |
| 275 | 264 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 276 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 277 | 265 | |
| 278 | 266 | const result = while (returnSuccess(10)) |value| { |
| 279 | 267 | break value; |
| ... | ... | @@ -319,7 +307,6 @@ test "while error 2 break statements and an else" { |
| 319 | 307 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 320 | 308 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 321 | 309 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 322 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 323 | 310 | |
| 324 | 311 | const S = struct { |
| 325 | 312 | fn entry(opt_t: anyerror!bool, f: bool) !void { |
| ... | ... | @@ -345,8 +332,6 @@ test "continue inline while loop" { |
| 345 | 332 | } |
| 346 | 333 | |
| 347 | 334 | test "else continue outer while" { |
| 348 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | |
| 349 | ||
| 350 | 335 | var i: usize = 0; |
| 351 | 336 | while (true) { |
| 352 | 337 | i += 1; |