| author | |
| committer | |
| log | a06e9eca45f72b28ed9ca00da5c9562e969cc84d |
| tree | eebd5b573c86e1ec206e5a57328c3649a05002e0 |
| parent | ed7e2938ff2385d658f04248f1c757b324009be4 |
| signature |
* airSlice
* airArrayToSlice
* and initial support for airSlicePtr and co27 files changed, 71 insertions(+), 180 deletions(-)
src/arch/aarch64/CodeGen.zig+71-12| ... | @@ -818,9 +818,7 @@ fn allocRegOrMem(self: *Self, inst: Air.Inst.Index, reg_ok: bool) !MCValue { | ... | @@ -818,9 +818,7 @@ fn allocRegOrMem(self: *Self, inst: Air.Inst.Index, reg_ok: bool) !MCValue { |
| 818 | 818 | ||
| 819 | if (reg_ok) { | 819 | if (reg_ok) { |
| 820 | // Make sure the type can fit in a register before we try to allocate one. | 820 | // Make sure the type can fit in a register before we try to allocate one. |
| 821 | const ptr_bits = self.target.cpu.arch.ptrBitWidth(); | 821 | if (abi_size <= 8) { |
| 822 | const ptr_bytes: u64 = @divExact(ptr_bits, 8); | ||
| 823 | if (abi_size <= ptr_bytes) { | ||
| 824 | if (self.register_manager.tryAllocReg(inst)) |reg| { | 822 | if (self.register_manager.tryAllocReg(inst)) |reg| { |
| 825 | return MCValue{ .register = registerAlias(reg, abi_size) }; | 823 | return MCValue{ .register = registerAlias(reg, abi_size) }; |
| 826 | } | 824 | } |
| ... | @@ -1038,7 +1036,20 @@ fn airMax(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -1038,7 +1036,20 @@ fn airMax(self: *Self, inst: Air.Inst.Index) !void { |
| 1038 | fn airSlice(self: *Self, inst: Air.Inst.Index) !void { | 1036 | fn airSlice(self: *Self, inst: Air.Inst.Index) !void { |
| 1039 | const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; | 1037 | const ty_pl = self.air.instructions.items(.data)[inst].ty_pl; |
| 1040 | const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; | 1038 | const bin_op = self.air.extraData(Air.Bin, ty_pl.payload).data; |
| 1041 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement slice for {}", .{self.target.cpu.arch}); | 1039 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 1040 | const ptr = try self.resolveInst(bin_op.lhs); | ||
| 1041 | const ptr_ty = self.air.typeOf(bin_op.lhs); | ||
| 1042 | const len = try self.resolveInst(bin_op.rhs); | ||
| 1043 | const len_ty = self.air.typeOf(bin_op.rhs); | ||
| 1044 | |||
| 1045 | const ptr_bits = self.target.cpu.arch.ptrBitWidth(); | ||
| 1046 | const ptr_bytes = @divExact(ptr_bits, 8); | ||
| 1047 | |||
| 1048 | const stack_offset = try self.allocMem(inst, ptr_bytes * 2, ptr_bytes * 2); | ||
| 1049 | try self.genSetStack(ptr_ty, stack_offset + ptr_bytes, ptr); | ||
| 1050 | try self.genSetStack(len_ty, stack_offset, len); | ||
| 1051 | break :result MCValue{ .stack_offset = stack_offset }; | ||
| 1052 | }; | ||
| 1042 | return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none }); | 1053 | return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none }); |
| 1043 | } | 1054 | } |
| 1044 | 1055 | ||
| ... | @@ -1602,22 +1613,39 @@ fn airWrapErrUnionErr(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -1602,22 +1613,39 @@ fn airWrapErrUnionErr(self: *Self, inst: Air.Inst.Index) !void { |
| 1602 | 1613 | ||
| 1603 | fn airSlicePtr(self: *Self, inst: Air.Inst.Index) !void { | 1614 | fn airSlicePtr(self: *Self, inst: Air.Inst.Index) !void { |
| 1604 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; | 1615 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 1605 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement slice_ptr for {}", .{self.target.cpu.arch}); | 1616 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 1617 | const ptr_bits = self.target.cpu.arch.ptrBitWidth(); | ||
| 1618 | const ptr_bytes = @divExact(ptr_bits, 8); | ||
| 1619 | const mcv = try self.resolveInst(ty_op.operand); | ||
| 1620 | switch (mcv) { | ||
| 1621 | .dead, .unreach, .none => unreachable, | ||
| 1622 | .register => unreachable, // a slice doesn't fit in one register | ||
| 1623 | .stack_offset => |off| { | ||
| 1624 | break :result MCValue{ .stack_offset = off + ptr_bytes }; | ||
| 1625 | }, | ||
| 1626 | .memory => |addr| { | ||
| 1627 | break :result MCValue{ .memory = addr }; | ||
| 1628 | }, | ||
| 1629 | else => return self.fail("TODO implement slice_len for {}", .{mcv}), | ||
| 1630 | } | ||
| 1631 | }; | ||
| 1606 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); | 1632 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 1607 | } | 1633 | } |
| 1608 | 1634 | ||
| 1609 | fn airSliceLen(self: *Self, inst: Air.Inst.Index) !void { | 1635 | fn airSliceLen(self: *Self, inst: Air.Inst.Index) !void { |
| 1610 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; | 1636 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 1611 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { | 1637 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 1638 | const ptr_bits = self.target.cpu.arch.ptrBitWidth(); | ||
| 1639 | const ptr_bytes = @divExact(ptr_bits, 8); | ||
| 1612 | const mcv = try self.resolveInst(ty_op.operand); | 1640 | const mcv = try self.resolveInst(ty_op.operand); |
| 1613 | switch (mcv) { | 1641 | switch (mcv) { |
| 1614 | .dead, .unreach => unreachable, | 1642 | .dead, .unreach, .none => unreachable, |
| 1615 | .register => unreachable, // a slice doesn't fit in one register | 1643 | .register => unreachable, // a slice doesn't fit in one register |
| 1616 | .stack_offset => |off| { | 1644 | .stack_offset => |off| { |
| 1617 | break :result MCValue{ .stack_offset = off }; | 1645 | break :result MCValue{ .stack_offset = off }; |
| 1618 | }, | 1646 | }, |
| 1619 | .memory => |addr| { | 1647 | .memory => |addr| { |
| 1620 | break :result MCValue{ .memory = addr + 8 }; | 1648 | break :result MCValue{ .memory = addr + ptr_bytes }; |
| 1621 | }, | 1649 | }, |
| 1622 | else => return self.fail("TODO implement slice_len for {}", .{mcv}), | 1650 | else => return self.fail("TODO implement slice_len for {}", .{mcv}), |
| 1623 | } | 1651 | } |
| ... | @@ -1627,13 +1655,33 @@ fn airSliceLen(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -1627,13 +1655,33 @@ fn airSliceLen(self: *Self, inst: Air.Inst.Index) !void { |
| 1627 | 1655 | ||
| 1628 | fn airPtrSliceLenPtr(self: *Self, inst: Air.Inst.Index) !void { | 1656 | fn airPtrSliceLenPtr(self: *Self, inst: Air.Inst.Index) !void { |
| 1629 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; | 1657 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 1630 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement ptr_slice_len_ptr for {}", .{self.target.cpu.arch}); | 1658 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 1659 | const ptr_bits = self.target.cpu.arch.ptrBitWidth(); | ||
| 1660 | const ptr_bytes = @divExact(ptr_bits, 8); | ||
| 1661 | const mcv = try self.resolveInst(ty_op.operand); | ||
| 1662 | switch (mcv) { | ||
| 1663 | .dead, .unreach, .none => unreachable, | ||
| 1664 | .ptr_stack_offset => |off| { | ||
| 1665 | break :result MCValue{ .ptr_stack_offset = off + ptr_bytes }; | ||
| 1666 | }, | ||
| 1667 | else => return self.fail("TODO implement ptr_slice_len_ptr for {}", .{mcv}), | ||
| 1668 | } | ||
| 1669 | }; | ||
| 1631 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); | 1670 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 1632 | } | 1671 | } |
| 1633 | 1672 | ||
| 1634 | fn airPtrSlicePtrPtr(self: *Self, inst: Air.Inst.Index) !void { | 1673 | fn airPtrSlicePtrPtr(self: *Self, inst: Air.Inst.Index) !void { |
| 1635 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; | 1674 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 1636 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement ptr_slice_ptr_ptr for {}", .{self.target.cpu.arch}); | 1675 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 1676 | const mcv = try self.resolveInst(ty_op.operand); | ||
| 1677 | switch (mcv) { | ||
| 1678 | .dead, .unreach, .none => unreachable, | ||
| 1679 | .ptr_stack_offset => |off| { | ||
| 1680 | break :result MCValue{ .ptr_stack_offset = off }; | ||
| 1681 | }, | ||
| 1682 | else => return self.fail("TODO implement ptr_slice_len_ptr for {}", .{mcv}), | ||
| 1683 | } | ||
| 1684 | }; | ||
| 1637 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); | 1685 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 1638 | } | 1686 | } |
| 1639 | 1687 | ||
| ... | @@ -3475,9 +3523,20 @@ fn airBitCast(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3475,9 +3523,20 @@ fn airBitCast(self: *Self, inst: Air.Inst.Index) !void { |
| 3475 | 3523 | ||
| 3476 | fn airArrayToSlice(self: *Self, inst: Air.Inst.Index) !void { | 3524 | fn airArrayToSlice(self: *Self, inst: Air.Inst.Index) !void { |
| 3477 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; | 3525 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 3478 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else return self.fail("TODO implement airArrayToSlice for {}", .{ | 3526 | const result: MCValue = if (self.liveness.isUnused(inst)) .dead else result: { |
| 3479 | self.target.cpu.arch, | 3527 | const ptr_ty = self.air.typeOf(ty_op.operand); |
| 3480 | }); | 3528 | const ptr = try self.resolveInst(ty_op.operand); |
| 3529 | const array_ty = ptr_ty.childType(); | ||
| 3530 | const array_len = @intCast(u32, array_ty.arrayLen()); | ||
| 3531 | |||
| 3532 | const ptr_bits = self.target.cpu.arch.ptrBitWidth(); | ||
| 3533 | const ptr_bytes = @divExact(ptr_bits, 8); | ||
| 3534 | |||
| 3535 | const stack_offset = try self.allocMem(inst, ptr_bytes * 2, ptr_bytes * 2); | ||
| 3536 | try self.genSetStack(ptr_ty, stack_offset + ptr_bytes, ptr); | ||
| 3537 | try self.genSetStack(Type.initTag(.usize), stack_offset, .{ .immediate = array_len }); | ||
| 3538 | break :result MCValue{ .stack_offset = stack_offset }; | ||
| 3539 | }; | ||
| 3481 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); | 3540 | return self.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 3482 | } | 3541 | } |
| 3483 | 3542 |
test/behavior/align.zig-1| ... | @@ -269,7 +269,6 @@ fn whyWouldYouEverDoThis(comptime align_bytes: u8) align(align_bytes) u8 { | ... | @@ -269,7 +269,6 @@ fn whyWouldYouEverDoThis(comptime align_bytes: u8) align(align_bytes) u8 { |
| 269 | 269 | ||
| 270 | test "runtime known array index has best alignment possible" { | 270 | test "runtime known array index has best alignment possible" { |
| 271 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO | 271 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| 272 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 273 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 272 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 274 | 273 | ||
| 275 | // take full advantage of over-alignment | 274 | // take full advantage of over-alignment |
test/behavior/array.zig-2| ... | @@ -142,8 +142,6 @@ test "array with sentinels" { | ... | @@ -142,8 +142,6 @@ test "array with sentinels" { |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | test "void arrays" { | 144 | test "void arrays" { |
| 145 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 146 | |||
| 147 | var array: [4]void = undefined; | 145 | var array: [4]void = undefined; |
| 148 | array[0] = void{}; | 146 | array[0] = void{}; |
| 149 | array[1] = array[2]; | 147 | array[1] = array[2]; |
test/behavior/bitcast.zig-10| ... | @@ -75,8 +75,6 @@ fn conv_uN(comptime N: usize, x: std.meta.Int(.unsigned, N)) std.meta.Int(.signe | ... | @@ -75,8 +75,6 @@ fn conv_uN(comptime N: usize, x: std.meta.Int(.unsigned, N)) std.meta.Int(.signe |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | test "nested bitcast" { | 77 | test "nested bitcast" { |
| 78 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 79 | |||
| 80 | const S = struct { | 78 | const S = struct { |
| 81 | fn moo(x: isize) !void { | 79 | fn moo(x: isize) !void { |
| 82 | try expect(@intCast(isize, 42) == x); | 80 | try expect(@intCast(isize, 42) == x); |
| ... | @@ -94,8 +92,6 @@ test "nested bitcast" { | ... | @@ -94,8 +92,6 @@ test "nested bitcast" { |
| 94 | } | 92 | } |
| 95 | 93 | ||
| 96 | test "@bitCast enum to its integer type" { | 94 | test "@bitCast enum to its integer type" { |
| 97 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 98 | |||
| 99 | const SOCK = enum(c_int) { | 95 | const SOCK = enum(c_int) { |
| 100 | A, | 96 | A, |
| 101 | B, | 97 | B, |
| ... | @@ -113,15 +109,11 @@ test "@bitCast enum to its integer type" { | ... | @@ -113,15 +109,11 @@ test "@bitCast enum to its integer type" { |
| 113 | 109 | ||
| 114 | // issue #3010: compiler segfault | 110 | // issue #3010: compiler segfault |
| 115 | test "bitcast literal [4]u8 param to u32" { | 111 | test "bitcast literal [4]u8 param to u32" { |
| 116 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 117 | |||
| 118 | const ip = @bitCast(u32, [_]u8{ 255, 255, 255, 255 }); | 112 | const ip = @bitCast(u32, [_]u8{ 255, 255, 255, 255 }); |
| 119 | try expect(ip == maxInt(u32)); | 113 | try expect(ip == maxInt(u32)); |
| 120 | } | 114 | } |
| 121 | 115 | ||
| 122 | test "bitcast generates a temporary value" { | 116 | test "bitcast generates a temporary value" { |
| 123 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 124 | |||
| 125 | var y = @as(u16, 0x55AA); | 117 | var y = @as(u16, 0x55AA); |
| 126 | const x = @bitCast(u16, @bitCast([2]u8, y)); | 118 | const x = @bitCast(u16, @bitCast([2]u8, y)); |
| 127 | try expect(y == x); | 119 | try expect(y == x); |
| ... | @@ -240,7 +232,6 @@ test "implicit cast to error union by returning" { | ... | @@ -240,7 +232,6 @@ test "implicit cast to error union by returning" { |
| 240 | test "bitcast packed struct literal to byte" { | 232 | test "bitcast packed struct literal to byte" { |
| 241 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 233 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 242 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 234 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 243 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 244 | 235 | ||
| 245 | const Foo = packed struct { | 236 | const Foo = packed struct { |
| 246 | value: u8, | 237 | value: u8, |
| ... | @@ -252,7 +243,6 @@ test "bitcast packed struct literal to byte" { | ... | @@ -252,7 +243,6 @@ test "bitcast packed struct literal to byte" { |
| 252 | test "comptime bitcast used in expression has the correct type" { | 243 | test "comptime bitcast used in expression has the correct type" { |
| 253 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 244 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 254 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 245 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 255 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 256 | 246 | ||
| 257 | const Foo = packed struct { | 247 | const Foo = packed struct { |
| 258 | value: u8, | 248 | value: u8, |
test/behavior/bugs/3367.zig-1| ... | @@ -10,7 +10,6 @@ const Mixin = struct { | ... | @@ -10,7 +10,6 @@ const Mixin = struct { |
| 10 | }; | 10 | }; |
| 11 | 11 | ||
| 12 | test "container member access usingnamespace decls" { | 12 | test "container member access usingnamespace decls" { |
| 13 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 14 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 13 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 15 | var foo = Foo{}; | 14 | var foo = Foo{}; |
| 16 | foo.two(); | 15 | foo.two(); |
test/behavior/bugs/3586.zig-2| ... | @@ -7,8 +7,6 @@ const Container = struct { | ... | @@ -7,8 +7,6 @@ const Container = struct { |
| 7 | }; | 7 | }; |
| 8 | 8 | ||
| 9 | test "fixed" { | 9 | test "fixed" { |
| 10 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 11 | |||
| 12 | var ctr = Container{ | 10 | var ctr = Container{ |
| 13 | .params = NoteParams{}, | 11 | .params = NoteParams{}, |
| 14 | }; | 12 | }; |
test/behavior/bugs/704.zig-2| ... | @@ -6,8 +6,6 @@ const xxx = struct { | ... | @@ -6,8 +6,6 @@ const xxx = struct { |
| 6 | } | 6 | } |
| 7 | }; | 7 | }; |
| 8 | test "bug 704" { | 8 | test "bug 704" { |
| 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 10 | |||
| 11 | var x: xxx = undefined; | 9 | var x: xxx = undefined; |
| 12 | x.bar(); | 10 | x.bar(); |
| 13 | } | 11 | } |
test/behavior/cast.zig-2| ... | @@ -984,7 +984,6 @@ test "peer type resolve array pointers, one of them const" { | ... | @@ -984,7 +984,6 @@ test "peer type resolve array pointers, one of them const" { |
| 984 | test "peer type resolve array pointer and unknown pointer" { | 984 | test "peer type resolve array pointer and unknown pointer" { |
| 985 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 985 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 986 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 986 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 987 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 988 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 987 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 989 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 988 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 990 | 989 | ||
| ... | @@ -1255,7 +1254,6 @@ test "assignment to optional pointer result loc" { | ... | @@ -1255,7 +1254,6 @@ test "assignment to optional pointer result loc" { |
| 1255 | } | 1254 | } |
| 1256 | 1255 | ||
| 1257 | test "cast between *[N]void and []void" { | 1256 | test "cast between *[N]void and []void" { |
| 1258 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 1259 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1257 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1260 | 1258 | ||
| 1261 | var a: [4]void = undefined; | 1259 | var a: [4]void = undefined; |
test/behavior/defer.zig-4| ... | @@ -5,8 +5,6 @@ const expectEqual = std.testing.expectEqual; | ... | @@ -5,8 +5,6 @@ const expectEqual = std.testing.expectEqual; |
| 5 | const expectError = std.testing.expectError; | 5 | const expectError = std.testing.expectError; |
| 6 | 6 | ||
| 7 | test "break and continue inside loop inside defer expression" { | 7 | test "break and continue inside loop inside defer expression" { |
| 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 9 | |||
| 10 | testBreakContInDefer(10); | 8 | testBreakContInDefer(10); |
| 11 | comptime testBreakContInDefer(10); | 9 | comptime testBreakContInDefer(10); |
| 12 | } | 10 | } |
| ... | @@ -23,8 +21,6 @@ fn testBreakContInDefer(x: usize) void { | ... | @@ -23,8 +21,6 @@ fn testBreakContInDefer(x: usize) void { |
| 23 | } | 21 | } |
| 24 | 22 | ||
| 25 | test "defer and labeled break" { | 23 | test "defer and labeled break" { |
| 26 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 27 | |||
| 28 | var i = @as(usize, 0); | 24 | var i = @as(usize, 0); |
| 29 | 25 | ||
| 30 | blk: { | 26 | blk: { |
test/behavior/enum.zig-40| ... | @@ -11,8 +11,6 @@ fn shouldEqual(n: Number, expected: u3) !void { | ... | @@ -11,8 +11,6 @@ fn shouldEqual(n: Number, expected: u3) !void { |
| 11 | } | 11 | } |
| 12 | 12 | ||
| 13 | test "enum to int" { | 13 | test "enum to int" { |
| 14 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 15 | |||
| 16 | try shouldEqual(Number.Zero, 0); | 14 | try shouldEqual(Number.Zero, 0); |
| 17 | try shouldEqual(Number.One, 1); | 15 | try shouldEqual(Number.One, 1); |
| 18 | try shouldEqual(Number.Two, 2); | 16 | try shouldEqual(Number.Two, 2); |
| ... | @@ -558,8 +556,6 @@ const ValueCount257 = enum { | ... | @@ -558,8 +556,6 @@ const ValueCount257 = enum { |
| 558 | }; | 556 | }; |
| 559 | 557 | ||
| 560 | test "enum sizes" { | 558 | test "enum sizes" { |
| 561 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 562 | |||
| 563 | comptime { | 559 | comptime { |
| 564 | try expect(@sizeOf(ValueCount1) == 0); | 560 | try expect(@sizeOf(ValueCount1) == 0); |
| 565 | try expect(@sizeOf(ValueCount2) == 1); | 561 | try expect(@sizeOf(ValueCount2) == 1); |
| ... | @@ -569,8 +565,6 @@ test "enum sizes" { | ... | @@ -569,8 +565,6 @@ test "enum sizes" { |
| 569 | } | 565 | } |
| 570 | 566 | ||
| 571 | test "enum literal equality" { | 567 | test "enum literal equality" { |
| 572 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 573 | |||
| 574 | const x = .hi; | 568 | const x = .hi; |
| 575 | const y = .ok; | 569 | const y = .ok; |
| 576 | const z = .hi; | 570 | const z = .hi; |
| ... | @@ -580,8 +574,6 @@ test "enum literal equality" { | ... | @@ -580,8 +574,6 @@ test "enum literal equality" { |
| 580 | } | 574 | } |
| 581 | 575 | ||
| 582 | test "enum literal cast to enum" { | 576 | test "enum literal cast to enum" { |
| 583 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 584 | |||
| 585 | const Color = enum { Auto, Off, On }; | 577 | const Color = enum { Auto, Off, On }; |
| 586 | 578 | ||
| 587 | var color1: Color = .Auto; | 579 | var color1: Color = .Auto; |
| ... | @@ -590,8 +582,6 @@ test "enum literal cast to enum" { | ... | @@ -590,8 +582,6 @@ test "enum literal cast to enum" { |
| 590 | } | 582 | } |
| 591 | 583 | ||
| 592 | test "peer type resolution with enum literal" { | 584 | test "peer type resolution with enum literal" { |
| 593 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 594 | |||
| 595 | const Items = enum { one, two }; | 585 | const Items = enum { one, two }; |
| 596 | 586 | ||
| 597 | try expect(Items.two == .two); | 587 | try expect(Items.two == .two); |
| ... | @@ -668,8 +658,6 @@ test "non-exhaustive enum" { | ... | @@ -668,8 +658,6 @@ test "non-exhaustive enum" { |
| 668 | } | 658 | } |
| 669 | 659 | ||
| 670 | test "empty non-exhaustive enum" { | 660 | test "empty non-exhaustive enum" { |
| 671 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 672 | |||
| 673 | const S = struct { | 661 | const S = struct { |
| 674 | const E = enum(u8) { _ }; | 662 | const E = enum(u8) { _ }; |
| 675 | 663 | ||
| ... | @@ -732,8 +720,6 @@ const EnumWithTagValues = enum(u4) { | ... | @@ -732,8 +720,6 @@ const EnumWithTagValues = enum(u4) { |
| 732 | D = 1 << 3, | 720 | D = 1 << 3, |
| 733 | }; | 721 | }; |
| 734 | test "enum with tag values don't require parens" { | 722 | test "enum with tag values don't require parens" { |
| 735 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 736 | |||
| 737 | try expect(@enumToInt(EnumWithTagValues.C) == 0b0100); | 723 | try expect(@enumToInt(EnumWithTagValues.C) == 0b0100); |
| 738 | } | 724 | } |
| 739 | 725 | ||
| ... | @@ -750,8 +736,6 @@ const MultipleChoice2 = enum(u32) { | ... | @@ -750,8 +736,6 @@ const MultipleChoice2 = enum(u32) { |
| 750 | }; | 736 | }; |
| 751 | 737 | ||
| 752 | test "cast integer literal to enum" { | 738 | test "cast integer literal to enum" { |
| 753 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 754 | |||
| 755 | try expect(@intToEnum(MultipleChoice2, 0) == MultipleChoice2.Unspecified1); | 739 | try expect(@intToEnum(MultipleChoice2, 0) == MultipleChoice2.Unspecified1); |
| 756 | try expect(@intToEnum(MultipleChoice2, 40) == MultipleChoice2.B); | 740 | try expect(@intToEnum(MultipleChoice2, 40) == MultipleChoice2.B); |
| 757 | } | 741 | } |
| ... | @@ -783,8 +767,6 @@ const Small2 = enum(u2) { One, Two }; | ... | @@ -783,8 +767,6 @@ const Small2 = enum(u2) { One, Two }; |
| 783 | const Small = enum(u2) { One, Two, Three, Four }; | 767 | const Small = enum(u2) { One, Two, Three, Four }; |
| 784 | 768 | ||
| 785 | test "set enum tag type" { | 769 | test "set enum tag type" { |
| 786 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 787 | |||
| 788 | { | 770 | { |
| 789 | var x = Small.One; | 771 | var x = Small.One; |
| 790 | x = Small.Two; | 772 | x = Small.Two; |
| ... | @@ -798,8 +780,6 @@ test "set enum tag type" { | ... | @@ -798,8 +780,6 @@ test "set enum tag type" { |
| 798 | } | 780 | } |
| 799 | 781 | ||
| 800 | test "casting enum to its tag type" { | 782 | test "casting enum to its tag type" { |
| 801 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 802 | |||
| 803 | try testCastEnumTag(Small2.Two); | 783 | try testCastEnumTag(Small2.Two); |
| 804 | comptime try testCastEnumTag(Small2.Two); | 784 | comptime try testCastEnumTag(Small2.Two); |
| 805 | } | 785 | } |
| ... | @@ -809,8 +789,6 @@ fn testCastEnumTag(value: Small2) !void { | ... | @@ -809,8 +789,6 @@ fn testCastEnumTag(value: Small2) !void { |
| 809 | } | 789 | } |
| 810 | 790 | ||
| 811 | test "enum with 1 field but explicit tag type should still have the tag type" { | 791 | test "enum with 1 field but explicit tag type should still have the tag type" { |
| 812 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 813 | |||
| 814 | const Enum = enum(u8) { | 792 | const Enum = enum(u8) { |
| 815 | B = 2, | 793 | B = 2, |
| 816 | }; | 794 | }; |
| ... | @@ -818,8 +796,6 @@ test "enum with 1 field but explicit tag type should still have the tag type" { | ... | @@ -818,8 +796,6 @@ test "enum with 1 field but explicit tag type should still have the tag type" { |
| 818 | } | 796 | } |
| 819 | 797 | ||
| 820 | test "signed integer as enum tag" { | 798 | test "signed integer as enum tag" { |
| 821 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 822 | |||
| 823 | const SignedEnum = enum(i2) { | 799 | const SignedEnum = enum(i2) { |
| 824 | A0 = -1, | 800 | A0 = -1, |
| 825 | A1 = 0, | 801 | A1 = 0, |
| ... | @@ -832,8 +808,6 @@ test "signed integer as enum tag" { | ... | @@ -832,8 +808,6 @@ test "signed integer as enum tag" { |
| 832 | } | 808 | } |
| 833 | 809 | ||
| 834 | test "enum with one member and custom tag type" { | 810 | test "enum with one member and custom tag type" { |
| 835 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 836 | |||
| 837 | const E = enum(u2) { | 811 | const E = enum(u2) { |
| 838 | One, | 812 | One, |
| 839 | }; | 813 | }; |
| ... | @@ -845,8 +819,6 @@ test "enum with one member and custom tag type" { | ... | @@ -845,8 +819,6 @@ test "enum with one member and custom tag type" { |
| 845 | } | 819 | } |
| 846 | 820 | ||
| 847 | test "enum with one member and u1 tag type @enumToInt" { | 821 | test "enum with one member and u1 tag type @enumToInt" { |
| 848 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 849 | |||
| 850 | const Enum = enum(u1) { | 822 | const Enum = enum(u1) { |
| 851 | Test, | 823 | Test, |
| 852 | }; | 824 | }; |
| ... | @@ -854,8 +826,6 @@ test "enum with one member and u1 tag type @enumToInt" { | ... | @@ -854,8 +826,6 @@ test "enum with one member and u1 tag type @enumToInt" { |
| 854 | } | 826 | } |
| 855 | 827 | ||
| 856 | test "enum with comptime_int tag type" { | 828 | test "enum with comptime_int tag type" { |
| 857 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 858 | |||
| 859 | const Enum = enum(comptime_int) { | 829 | const Enum = enum(comptime_int) { |
| 860 | One = 3, | 830 | One = 3, |
| 861 | Two = 2, | 831 | Two = 2, |
| ... | @@ -865,8 +835,6 @@ test "enum with comptime_int tag type" { | ... | @@ -865,8 +835,6 @@ test "enum with comptime_int tag type" { |
| 865 | } | 835 | } |
| 866 | 836 | ||
| 867 | test "enum with one member default to u0 tag type" { | 837 | test "enum with one member default to u0 tag type" { |
| 868 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 869 | |||
| 870 | const E0 = enum { X }; | 838 | const E0 = enum { X }; |
| 871 | comptime try expect(Tag(E0) == u0); | 839 | comptime try expect(Tag(E0) == u0); |
| 872 | } | 840 | } |
| ... | @@ -883,15 +851,11 @@ fn doALoopThing(id: EnumWithOneMember) void { | ... | @@ -883,15 +851,11 @@ fn doALoopThing(id: EnumWithOneMember) void { |
| 883 | } | 851 | } |
| 884 | 852 | ||
| 885 | test "comparison operator on enum with one member is comptime known" { | 853 | test "comparison operator on enum with one member is comptime known" { |
| 886 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 887 | |||
| 888 | doALoopThing(EnumWithOneMember.Eof); | 854 | doALoopThing(EnumWithOneMember.Eof); |
| 889 | } | 855 | } |
| 890 | 856 | ||
| 891 | const State = enum { Start }; | 857 | const State = enum { Start }; |
| 892 | test "switch on enum with one member is comptime known" { | 858 | test "switch on enum with one member is comptime known" { |
| 893 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 894 | |||
| 895 | var state = State.Start; | 859 | var state = State.Start; |
| 896 | switch (state) { | 860 | switch (state) { |
| 897 | State.Start => return, | 861 | State.Start => return, |
| ... | @@ -900,8 +864,6 @@ test "switch on enum with one member is comptime known" { | ... | @@ -900,8 +864,6 @@ test "switch on enum with one member is comptime known" { |
| 900 | } | 864 | } |
| 901 | 865 | ||
| 902 | test "method call on an enum" { | 866 | test "method call on an enum" { |
| 903 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 904 | |||
| 905 | const S = struct { | 867 | const S = struct { |
| 906 | const E = enum { | 868 | const E = enum { |
| 907 | one, | 869 | one, |
| ... | @@ -1141,8 +1103,6 @@ fn getC(data: *const BitFieldOfEnums) C { | ... | @@ -1141,8 +1103,6 @@ fn getC(data: *const BitFieldOfEnums) C { |
| 1141 | } | 1103 | } |
| 1142 | 1104 | ||
| 1143 | test "enum literal in array literal" { | 1105 | test "enum literal in array literal" { |
| 1144 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 1145 | |||
| 1146 | const Items = enum { one, two }; | 1106 | const Items = enum { one, two }; |
| 1147 | const array = [_]Items{ .one, .two }; | 1107 | const array = [_]Items{ .one, .two }; |
| 1148 | 1108 |
test/behavior/error.zig-13| ... | @@ -6,16 +6,12 @@ const expectEqual = std.testing.expectEqual; | ... | @@ -6,16 +6,12 @@ const expectEqual = std.testing.expectEqual; |
| 6 | const mem = std.mem; | 6 | const mem = std.mem; |
| 7 | 7 | ||
| 8 | test "error values" { | 8 | test "error values" { |
| 9 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 10 | |||
| 11 | const a = @errorToInt(error.err1); | 9 | const a = @errorToInt(error.err1); |
| 12 | const b = @errorToInt(error.err2); | 10 | const b = @errorToInt(error.err2); |
| 13 | try expect(a != b); | 11 | try expect(a != b); |
| 14 | } | 12 | } |
| 15 | 13 | ||
| 16 | test "redefinition of error values allowed" { | 14 | test "redefinition of error values allowed" { |
| 17 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 18 | |||
| 19 | shouldBeNotEqual(error.AnError, error.SecondError); | 15 | shouldBeNotEqual(error.AnError, error.SecondError); |
| 20 | } | 16 | } |
| 21 | fn shouldBeNotEqual(a: anyerror, b: anyerror) void { | 17 | fn shouldBeNotEqual(a: anyerror, b: anyerror) void { |
| ... | @@ -36,8 +32,6 @@ fn errBinaryOperatorG(x: bool) anyerror!isize { | ... | @@ -36,8 +32,6 @@ fn errBinaryOperatorG(x: bool) anyerror!isize { |
| 36 | } | 32 | } |
| 37 | 33 | ||
| 38 | test "empty error union" { | 34 | test "empty error union" { |
| 39 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 40 | |||
| 41 | const x = error{} || error{}; | 35 | const x = error{} || error{}; |
| 42 | _ = x; | 36 | _ = x; |
| 43 | } | 37 | } |
| ... | @@ -91,8 +85,6 @@ fn makeANonErr() anyerror!i32 { | ... | @@ -91,8 +85,6 @@ fn makeANonErr() anyerror!i32 { |
| 91 | } | 85 | } |
| 92 | 86 | ||
| 93 | test "syntax: optional operator in front of error union operator" { | 87 | test "syntax: optional operator in front of error union operator" { |
| 94 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 95 | |||
| 96 | comptime { | 88 | comptime { |
| 97 | try expect(?(anyerror!i32) == ?(anyerror!i32)); | 89 | try expect(?(anyerror!i32) == ?(anyerror!i32)); |
| 98 | } | 90 | } |
| ... | @@ -147,8 +139,6 @@ test "implicit cast to optional to error union to return result loc" { | ... | @@ -147,8 +139,6 @@ test "implicit cast to optional to error union to return result loc" { |
| 147 | } | 139 | } |
| 148 | 140 | ||
| 149 | test "error: fn returning empty error set can be passed as fn returning any error" { | 141 | test "error: fn returning empty error set can be passed as fn returning any error" { |
| 150 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 151 | |||
| 152 | entry(); | 142 | entry(); |
| 153 | comptime entry(); | 143 | comptime entry(); |
| 154 | } | 144 | } |
| ... | @@ -165,7 +155,6 @@ fn foo2(f: fn () anyerror!void) void { | ... | @@ -165,7 +155,6 @@ fn foo2(f: fn () anyerror!void) void { |
| 165 | fn bar2() (error{}!void) {} | 155 | fn bar2() (error{}!void) {} |
| 166 | 156 | ||
| 167 | test "error union type " { | 157 | test "error union type " { |
| 168 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 169 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 158 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 170 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 159 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 171 | 160 | ||
| ... | @@ -182,7 +171,6 @@ fn testErrorUnionType() !void { | ... | @@ -182,7 +171,6 @@ fn testErrorUnionType() !void { |
| 182 | } | 171 | } |
| 183 | 172 | ||
| 184 | test "error set type" { | 173 | test "error set type" { |
| 185 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 186 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 174 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 187 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 175 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 188 | 176 | ||
| ... | @@ -209,7 +197,6 @@ fn testErrorSetType() !void { | ... | @@ -209,7 +197,6 @@ fn testErrorSetType() !void { |
| 209 | } | 197 | } |
| 210 | 198 | ||
| 211 | test "explicit error set cast" { | 199 | test "explicit error set cast" { |
| 212 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 213 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 200 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 214 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 201 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 215 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 202 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
test/behavior/floatop.zig-2| ... | @@ -24,7 +24,6 @@ test "floating point comparisons" { | ... | @@ -24,7 +24,6 @@ test "floating point comparisons" { |
| 24 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 24 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 25 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 25 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 26 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 26 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 27 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 28 | 27 | ||
| 29 | try testFloatComparisons(); | 28 | try testFloatComparisons(); |
| 30 | comptime try testFloatComparisons(); | 29 | comptime try testFloatComparisons(); |
| ... | @@ -96,7 +95,6 @@ test "negative f128 floatToInt at compile-time" { | ... | @@ -96,7 +95,6 @@ test "negative f128 floatToInt at compile-time" { |
| 96 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 95 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 97 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 96 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 98 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 97 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 99 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 100 | 98 | ||
| 101 | const a: f128 = -2; | 99 | const a: f128 = -2; |
| 102 | var b = @floatToInt(i64, a); | 100 | var b = @floatToInt(i64, a); |
test/behavior/fn.zig-20| ... | @@ -5,8 +5,6 @@ const expect = testing.expect; | ... | @@ -5,8 +5,6 @@ const expect = testing.expect; |
| 5 | const expectEqual = testing.expectEqual; | 5 | const expectEqual = testing.expectEqual; |
| 6 | 6 | ||
| 7 | test "params" { | 7 | test "params" { |
| 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 9 | |||
| 10 | try expect(testParamsAdd(22, 11) == 33); | 8 | try expect(testParamsAdd(22, 11) == 33); |
| 11 | } | 9 | } |
| 12 | fn testParamsAdd(a: i32, b: i32) i32 { | 10 | fn testParamsAdd(a: i32, b: i32) i32 { |
| ... | @@ -14,8 +12,6 @@ fn testParamsAdd(a: i32, b: i32) i32 { | ... | @@ -14,8 +12,6 @@ fn testParamsAdd(a: i32, b: i32) i32 { |
| 14 | } | 12 | } |
| 15 | 13 | ||
| 16 | test "local variables" { | 14 | test "local variables" { |
| 17 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 18 | |||
| 19 | testLocVars(2); | 15 | testLocVars(2); |
| 20 | } | 16 | } |
| 21 | fn testLocVars(b: i32) void { | 17 | fn testLocVars(b: i32) void { |
| ... | @@ -24,8 +20,6 @@ fn testLocVars(b: i32) void { | ... | @@ -24,8 +20,6 @@ fn testLocVars(b: i32) void { |
| 24 | } | 20 | } |
| 25 | 21 | ||
| 26 | test "mutable local variables" { | 22 | test "mutable local variables" { |
| 27 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 28 | |||
| 29 | var zero: i32 = 0; | 23 | var zero: i32 = 0; |
| 30 | try expect(zero == 0); | 24 | try expect(zero == 0); |
| 31 | 25 | ||
| ... | @@ -37,8 +31,6 @@ test "mutable local variables" { | ... | @@ -37,8 +31,6 @@ test "mutable local variables" { |
| 37 | } | 31 | } |
| 38 | 32 | ||
| 39 | test "separate block scopes" { | 33 | test "separate block scopes" { |
| 40 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 41 | |||
| 42 | { | 34 | { |
| 43 | const no_conflict: i32 = 5; | 35 | const no_conflict: i32 = 5; |
| 44 | try expect(no_conflict == 5); | 36 | try expect(no_conflict == 5); |
| ... | @@ -55,14 +47,10 @@ fn @"weird function name"() i32 { | ... | @@ -55,14 +47,10 @@ fn @"weird function name"() i32 { |
| 55 | return 1234; | 47 | return 1234; |
| 56 | } | 48 | } |
| 57 | test "weird function name" { | 49 | test "weird function name" { |
| 58 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 59 | |||
| 60 | try expect(@"weird function name"() == 1234); | 50 | try expect(@"weird function name"() == 1234); |
| 61 | } | 51 | } |
| 62 | 52 | ||
| 63 | test "assign inline fn to const variable" { | 53 | test "assign inline fn to const variable" { |
| 64 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 65 | |||
| 66 | const a = inlineFn; | 54 | const a = inlineFn; |
| 67 | a(); | 55 | a(); |
| 68 | } | 56 | } |
| ... | @@ -80,8 +68,6 @@ fn outer(y: u32) *const fn (u32) u32 { | ... | @@ -80,8 +68,6 @@ fn outer(y: u32) *const fn (u32) u32 { |
| 80 | } | 68 | } |
| 81 | 69 | ||
| 82 | test "return inner function which references comptime variable of outer function" { | 70 | test "return inner function which references comptime variable of outer function" { |
| 83 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 84 | |||
| 85 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 71 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; |
| 86 | 72 | ||
| 87 | var func = outer(10); | 73 | var func = outer(10); |
| ... | @@ -149,8 +135,6 @@ test "inline function call that calls optional function pointer, return pointer | ... | @@ -149,8 +135,6 @@ test "inline function call that calls optional function pointer, return pointer |
| 149 | } | 135 | } |
| 150 | 136 | ||
| 151 | test "implicit cast function unreachable return" { | 137 | test "implicit cast function unreachable return" { |
| 152 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 153 | |||
| 154 | wantsFnWithVoid(fnWithUnreachable); | 138 | wantsFnWithVoid(fnWithUnreachable); |
| 155 | } | 139 | } |
| 156 | 140 | ||
| ... | @@ -348,8 +332,6 @@ fn fn4() u32 { | ... | @@ -348,8 +332,6 @@ fn fn4() u32 { |
| 348 | } | 332 | } |
| 349 | 333 | ||
| 350 | test "number literal as an argument" { | 334 | test "number literal as an argument" { |
| 351 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 352 | |||
| 353 | try numberLiteralArg(3); | 335 | try numberLiteralArg(3); |
| 354 | comptime try numberLiteralArg(3); | 336 | comptime try numberLiteralArg(3); |
| 355 | } | 337 | } |
| ... | @@ -380,8 +362,6 @@ test "function call with anon list literal" { | ... | @@ -380,8 +362,6 @@ test "function call with anon list literal" { |
| 380 | } | 362 | } |
| 381 | 363 | ||
| 382 | test "ability to give comptime types and non comptime types to same parameter" { | 364 | test "ability to give comptime types and non comptime types to same parameter" { |
| 383 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 384 | |||
| 385 | const S = struct { | 365 | const S = struct { |
| 386 | fn doTheTest() !void { | 366 | fn doTheTest() !void { |
| 387 | var x: i32 = 1; | 367 | var x: i32 = 1; |
test/behavior/for.zig-6| ... | @@ -21,8 +21,6 @@ test "continue in for loop" { | ... | @@ -21,8 +21,6 @@ test "continue in for loop" { |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | test "break from outer for loop" { | 23 | test "break from outer for loop" { |
| 24 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 25 | |||
| 26 | try testBreakOuter(); | 24 | try testBreakOuter(); |
| 27 | comptime try testBreakOuter(); | 25 | comptime try testBreakOuter(); |
| 28 | } | 26 | } |
| ... | @@ -40,8 +38,6 @@ fn testBreakOuter() !void { | ... | @@ -40,8 +38,6 @@ fn testBreakOuter() !void { |
| 40 | } | 38 | } |
| 41 | 39 | ||
| 42 | test "continue outer for loop" { | 40 | test "continue outer for loop" { |
| 43 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 44 | |||
| 45 | try testContinueOuter(); | 41 | try testContinueOuter(); |
| 46 | comptime try testContinueOuter(); | 42 | comptime try testContinueOuter(); |
| 47 | } | 43 | } |
| ... | @@ -59,8 +55,6 @@ fn testContinueOuter() !void { | ... | @@ -59,8 +55,6 @@ fn testContinueOuter() !void { |
| 59 | } | 55 | } |
| 60 | 56 | ||
| 61 | test "ignore lval with underscore (for loop)" { | 57 | test "ignore lval with underscore (for loop)" { |
| 62 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 63 | |||
| 64 | for ([_]void{}) |_, i| { | 58 | for ([_]void{}) |_, i| { |
| 65 | _ = i; | 59 | _ = i; |
| 66 | for ([_]void{}) |_, j| { | 60 | for ([_]void{}) |_, j| { |
test/behavior/generics.zig-9| ... | @@ -5,8 +5,6 @@ const expect = testing.expect; | ... | @@ -5,8 +5,6 @@ const expect = testing.expect; |
| 5 | const expectEqual = testing.expectEqual; | 5 | const expectEqual = testing.expectEqual; |
| 6 | 6 | ||
| 7 | test "one param, explicit comptime" { | 7 | test "one param, explicit comptime" { |
| 8 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 9 | |||
| 10 | var x: usize = 0; | 8 | var x: usize = 0; |
| 11 | x += checkSize(i32); | 9 | x += checkSize(i32); |
| 12 | x += checkSize(bool); | 10 | x += checkSize(bool); |
| ... | @@ -42,8 +40,6 @@ fn add(comptime a: i32, b: i32) i32 { | ... | @@ -42,8 +40,6 @@ fn add(comptime a: i32, b: i32) i32 { |
| 42 | 40 | ||
| 43 | const the_max = max(u32, 1234, 5678); | 41 | const the_max = max(u32, 1234, 5678); |
| 44 | test "compile time generic eval" { | 42 | test "compile time generic eval" { |
| 45 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 46 | |||
| 47 | try expect(the_max == 5678); | 43 | try expect(the_max == 5678); |
| 48 | } | 44 | } |
| 49 | 45 | ||
| ... | @@ -142,8 +138,6 @@ pub fn SmallList(comptime T: type, comptime STATIC_SIZE: usize) type { | ... | @@ -142,8 +138,6 @@ pub fn SmallList(comptime T: type, comptime STATIC_SIZE: usize) type { |
| 142 | } | 138 | } |
| 143 | 139 | ||
| 144 | test "const decls in struct" { | 140 | test "const decls in struct" { |
| 145 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 146 | |||
| 147 | try expect(GenericDataThing(3).count_plus_one == 4); | 141 | try expect(GenericDataThing(3).count_plus_one == 4); |
| 148 | } | 142 | } |
| 149 | fn GenericDataThing(comptime count: isize) type { | 143 | fn GenericDataThing(comptime count: isize) type { |
| ... | @@ -153,8 +147,6 @@ fn GenericDataThing(comptime count: isize) type { | ... | @@ -153,8 +147,6 @@ fn GenericDataThing(comptime count: isize) type { |
| 153 | } | 147 | } |
| 154 | 148 | ||
| 155 | test "use generic param in generic param" { | 149 | test "use generic param in generic param" { |
| 156 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 157 | |||
| 158 | try expect(aGenericFn(i32, 3, 4) == 7); | 150 | try expect(aGenericFn(i32, 3, 4) == 7); |
| 159 | } | 151 | } |
| 160 | fn aGenericFn(comptime T: type, comptime a: T, b: T) T { | 152 | fn aGenericFn(comptime T: type, comptime a: T, b: T) T { |
| ... | @@ -197,7 +189,6 @@ test "generic fn keeps non-generic parameter types" { | ... | @@ -197,7 +189,6 @@ test "generic fn keeps non-generic parameter types" { |
| 197 | } | 189 | } |
| 198 | 190 | ||
| 199 | test "array of generic fns" { | 191 | test "array of generic fns" { |
| 200 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 201 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; | 192 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 202 | 193 | ||
| 203 | try expect(foos[0](true)); | 194 | try expect(foos[0](true)); |
test/behavior/if.zig-8| ... | @@ -4,8 +4,6 @@ const expect = std.testing.expect; | ... | @@ -4,8 +4,6 @@ const expect = std.testing.expect; |
| 4 | const expectEqual = std.testing.expectEqual; | 4 | const expectEqual = std.testing.expectEqual; |
| 5 | 5 | ||
| 6 | test "if statements" { | 6 | test "if statements" { |
| 7 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 8 | |||
| 9 | shouldBeEqual(1, 1); | 7 | shouldBeEqual(1, 1); |
| 10 | firstEqlThird(2, 1, 2); | 8 | firstEqlThird(2, 1, 2); |
| 11 | } | 9 | } |
| ... | @@ -29,8 +27,6 @@ fn firstEqlThird(a: i32, b: i32, c: i32) void { | ... | @@ -29,8 +27,6 @@ fn firstEqlThird(a: i32, b: i32, c: i32) void { |
| 29 | } | 27 | } |
| 30 | 28 | ||
| 31 | test "else if expression" { | 29 | test "else if expression" { |
| 32 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 33 | |||
| 34 | try expect(elseIfExpressionF(1) == 1); | 30 | try expect(elseIfExpressionF(1) == 1); |
| 35 | } | 31 | } |
| 36 | fn elseIfExpressionF(c: u8) u8 { | 32 | fn elseIfExpressionF(c: u8) u8 { |
| ... | @@ -64,8 +60,6 @@ test "unwrap mutable global var" { | ... | @@ -64,8 +60,6 @@ test "unwrap mutable global var" { |
| 64 | } | 60 | } |
| 65 | 61 | ||
| 66 | test "labeled break inside comptime if inside runtime if" { | 62 | test "labeled break inside comptime if inside runtime if" { |
| 67 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 68 | |||
| 69 | var answer: i32 = 0; | 63 | var answer: i32 = 0; |
| 70 | var c = true; | 64 | var c = true; |
| 71 | if (c) { | 65 | if (c) { |
| ... | @@ -77,8 +71,6 @@ test "labeled break inside comptime if inside runtime if" { | ... | @@ -77,8 +71,6 @@ test "labeled break inside comptime if inside runtime if" { |
| 77 | } | 71 | } |
| 78 | 72 | ||
| 79 | test "const result loc, runtime if cond, else unreachable" { | 73 | test "const result loc, runtime if cond, else unreachable" { |
| 80 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 81 | |||
| 82 | const Num = enum { One, Two }; | 74 | const Num = enum { One, Two }; |
| 83 | 75 | ||
| 84 | var t = true; | 76 | var t = true; |
test/behavior/inttoptr.zig-1| ... | @@ -2,7 +2,6 @@ const builtin = @import("builtin"); | ... | @@ -2,7 +2,6 @@ const builtin = @import("builtin"); |
| 2 | 2 | ||
| 3 | test "casting integer address to function pointer" { | 3 | test "casting integer address to function pointer" { |
| 4 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | 4 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; |
| 5 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 6 | 5 | ||
| 7 | addressToFunction(); | 6 | addressToFunction(); |
| 8 | comptime addressToFunction(); | 7 | comptime addressToFunction(); |
test/behavior/math.zig-2| ... | @@ -312,7 +312,6 @@ test "comptime_int multi-limb partial shift right" { | ... | @@ -312,7 +312,6 @@ test "comptime_int multi-limb partial shift right" { |
| 312 | test "xor" { | 312 | test "xor" { |
| 313 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 313 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 314 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 314 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 315 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 316 | 315 | ||
| 317 | try test_xor(); | 316 | try test_xor(); |
| 318 | comptime try test_xor(); | 317 | comptime try test_xor(); |
| ... | @@ -732,7 +731,6 @@ test "overflow arithmetic with u0 values" { | ... | @@ -732,7 +731,6 @@ test "overflow arithmetic with u0 values" { |
| 732 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 731 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 733 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 732 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 734 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 733 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 735 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 736 | 734 | ||
| 737 | var result: u0 = undefined; | 735 | var result: u0 = undefined; |
| 738 | try expect(!@addWithOverflow(u0, 0, 0, &result)); | 736 | try expect(!@addWithOverflow(u0, 0, 0, &result)); |
test/behavior/null.zig-2| ... | @@ -125,8 +125,6 @@ fn baz(x: ?Empty) ?Empty { | ... | @@ -125,8 +125,6 @@ fn baz(x: ?Empty) ?Empty { |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | test "null with default unwrap" { | 127 | test "null with default unwrap" { |
| 128 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 129 | |||
| 130 | const x: i32 = null orelse 1; | 128 | const x: i32 = null orelse 1; |
| 131 | try expect(x == 1); | 129 | try expect(x == 1); |
| 132 | } | 130 | } |
test/behavior/slice.zig-2| ... | @@ -218,8 +218,6 @@ test "compile time slice of pointer to hard coded address" { | ... | @@ -218,8 +218,6 @@ test "compile time slice of pointer to hard coded address" { |
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | test "slice string literal has correct type" { | 220 | test "slice string literal has correct type" { |
| 221 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 222 | |||
| 223 | comptime { | 221 | comptime { |
| 224 | try expect(@TypeOf("aoeu"[0..]) == *const [4:0]u8); | 222 | try expect(@TypeOf("aoeu"[0..]) == *const [4:0]u8); |
| 225 | const array = [_]i32{ 1, 2, 3, 4 }; | 223 | const array = [_]i32{ 1, 2, 3, 4 }; |
test/behavior/struct.zig-3| ... | @@ -213,8 +213,6 @@ fn makeBar2(x: i32, y: i32) Bar { | ... | @@ -213,8 +213,6 @@ fn makeBar2(x: i32, y: i32) Bar { |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | test "call method with mutable reference to struct with no fields" { | 215 | test "call method with mutable reference to struct with no fields" { |
| 216 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 217 | |||
| 218 | const S = struct { | 216 | const S = struct { |
| 219 | fn doC(s: *const @This()) bool { | 217 | fn doC(s: *const @This()) bool { |
| 220 | _ = s; | 218 | _ = s; |
| ... | @@ -768,7 +766,6 @@ test "pointer to packed struct member in a stack variable" { | ... | @@ -768,7 +766,6 @@ test "pointer to packed struct member in a stack variable" { |
| 768 | test "packed struct with u0 field access" { | 766 | test "packed struct with u0 field access" { |
| 769 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 767 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 770 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | 768 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
| 771 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 772 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 769 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 773 | 770 | ||
| 774 | const S = packed struct { | 771 | const S = packed struct { |
test/behavior/switch.zig-4| ... | @@ -190,8 +190,6 @@ test "switch with disjoint range" { | ... | @@ -190,8 +190,6 @@ test "switch with disjoint range" { |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | test "switch variable for range and multiple prongs" { | 192 | test "switch variable for range and multiple prongs" { |
| 193 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 194 | |||
| 195 | const S = struct { | 193 | const S = struct { |
| 196 | fn doTheTest() !void { | 194 | fn doTheTest() !void { |
| 197 | var u: u8 = 16; | 195 | var u: u8 = 16; |
| ... | @@ -357,8 +355,6 @@ fn returnsFalse() bool { | ... | @@ -357,8 +355,6 @@ fn returnsFalse() bool { |
| 357 | } | 355 | } |
| 358 | } | 356 | } |
| 359 | test "switch on const enum with var" { | 357 | test "switch on const enum with var" { |
| 360 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | ||
| 361 | |||
| 362 | try expect(!returnsFalse()); | 358 | try expect(!returnsFalse()); |
| 363 | } | 359 | } |
| 364 | 360 |
test/behavior/this.zig-2| ... | @@ -21,8 +21,6 @@ fn add(x: i32, y: i32) i32 { | ... | @@ -21,8 +21,6 @@ fn add(x: i32, y: i32) i32 { |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | test "this refer to module call private fn" { | 23 | test "this refer to module call private fn" { |
| 24 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 25 | |||
| 26 | try expect(module.add(1, 2) == 3); | 24 | try expect(module.add(1, 2) == 3); |
| 27 | } | 25 | } |
| 28 | 26 |
test/behavior/truncate.zig-16| ... | @@ -3,62 +3,46 @@ const builtin = @import("builtin"); | ... | @@ -3,62 +3,46 @@ const builtin = @import("builtin"); |
| 3 | const expect = std.testing.expect; | 3 | const expect = std.testing.expect; |
| 4 | 4 | ||
| 5 | test "truncate u0 to larger integer allowed and has comptime known result" { | 5 | test "truncate u0 to larger integer allowed and has comptime known result" { |
| 6 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 7 | |||
| 8 | var x: u0 = 0; | 6 | var x: u0 = 0; |
| 9 | const y = @truncate(u8, x); | 7 | const y = @truncate(u8, x); |
| 10 | comptime try expect(y == 0); | 8 | comptime try expect(y == 0); |
| 11 | } | 9 | } |
| 12 | 10 | ||
| 13 | test "truncate.u0.literal" { | 11 | test "truncate.u0.literal" { |
| 14 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 15 | |||
| 16 | var z = @truncate(u0, 0); | 12 | var z = @truncate(u0, 0); |
| 17 | try expect(z == 0); | 13 | try expect(z == 0); |
| 18 | } | 14 | } |
| 19 | 15 | ||
| 20 | test "truncate.u0.const" { | 16 | test "truncate.u0.const" { |
| 21 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 22 | |||
| 23 | const c0: usize = 0; | 17 | const c0: usize = 0; |
| 24 | var z = @truncate(u0, c0); | 18 | var z = @truncate(u0, c0); |
| 25 | try expect(z == 0); | 19 | try expect(z == 0); |
| 26 | } | 20 | } |
| 27 | 21 | ||
| 28 | test "truncate.u0.var" { | 22 | test "truncate.u0.var" { |
| 29 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 30 | |||
| 31 | var d: u8 = 2; | 23 | var d: u8 = 2; |
| 32 | var z = @truncate(u0, d); | 24 | var z = @truncate(u0, d); |
| 33 | try expect(z == 0); | 25 | try expect(z == 0); |
| 34 | } | 26 | } |
| 35 | 27 | ||
| 36 | test "truncate i0 to larger integer allowed and has comptime known result" { | 28 | test "truncate i0 to larger integer allowed and has comptime known result" { |
| 37 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 38 | |||
| 39 | var x: i0 = 0; | 29 | var x: i0 = 0; |
| 40 | const y = @truncate(i8, x); | 30 | const y = @truncate(i8, x); |
| 41 | comptime try expect(y == 0); | 31 | comptime try expect(y == 0); |
| 42 | } | 32 | } |
| 43 | 33 | ||
| 44 | test "truncate.i0.literal" { | 34 | test "truncate.i0.literal" { |
| 45 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 46 | |||
| 47 | var z = @truncate(i0, 0); | 35 | var z = @truncate(i0, 0); |
| 48 | try expect(z == 0); | 36 | try expect(z == 0); |
| 49 | } | 37 | } |
| 50 | 38 | ||
| 51 | test "truncate.i0.const" { | 39 | test "truncate.i0.const" { |
| 52 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 53 | |||
| 54 | const c0: isize = 0; | 40 | const c0: isize = 0; |
| 55 | var z = @truncate(i0, c0); | 41 | var z = @truncate(i0, c0); |
| 56 | try expect(z == 0); | 42 | try expect(z == 0); |
| 57 | } | 43 | } |
| 58 | 44 | ||
| 59 | test "truncate.i0.var" { | 45 | test "truncate.i0.var" { |
| 60 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 61 | |||
| 62 | var d: i8 = 2; | 46 | var d: i8 = 2; |
| 63 | var z = @truncate(i0, d); | 47 | var z = @truncate(i0, d); |
| 64 | try expect(z == 0); | 48 | try expect(z == 0); |
test/behavior/try.zig-4| ... | @@ -24,8 +24,6 @@ fn returnsTen() anyerror!i32 { | ... | @@ -24,8 +24,6 @@ fn returnsTen() anyerror!i32 { |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | test "try without vars" { | 26 | test "try without vars" { |
| 27 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 28 | |||
| 29 | const result1 = if (failIfTrue(true)) 1 else |_| @as(i32, 2); | 27 | const result1 = if (failIfTrue(true)) 1 else |_| @as(i32, 2); |
| 30 | try expect(result1 == 2); | 28 | try expect(result1 == 2); |
| 31 | 29 | ||
| ... | @@ -42,8 +40,6 @@ fn failIfTrue(ok: bool) anyerror!void { | ... | @@ -42,8 +40,6 @@ fn failIfTrue(ok: bool) anyerror!void { |
| 42 | } | 40 | } |
| 43 | 41 | ||
| 44 | test "try then not executed with assignment" { | 42 | test "try then not executed with assignment" { |
| 45 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 46 | |||
| 47 | if (failIfTrue(true)) { | 43 | if (failIfTrue(true)) { |
| 48 | unreachable; | 44 | unreachable; |
| 49 | } else |err| { | 45 | } else |err| { |
test/behavior/usingnamespace.zig-8| ... | @@ -11,8 +11,6 @@ const C = struct { | ... | @@ -11,8 +11,6 @@ const C = struct { |
| 11 | }; | 11 | }; |
| 12 | 12 | ||
| 13 | test "basic usingnamespace" { | 13 | test "basic usingnamespace" { |
| 14 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 15 | |||
| 16 | try std.testing.expect(C.B == bool); | 14 | try std.testing.expect(C.B == bool); |
| 17 | } | 15 | } |
| 18 | 16 | ||
| ... | @@ -23,8 +21,6 @@ fn Foo(comptime T: type) type { | ... | @@ -23,8 +21,6 @@ fn Foo(comptime T: type) type { |
| 23 | } | 21 | } |
| 24 | 22 | ||
| 25 | test "usingnamespace inside a generic struct" { | 23 | test "usingnamespace inside a generic struct" { |
| 26 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 27 | |||
| 28 | const std2 = Foo(std); | 24 | const std2 = Foo(std); |
| 29 | const testing2 = Foo(std.testing); | 25 | const testing2 = Foo(std.testing); |
| 30 | try std2.testing.expect(true); | 26 | try std2.testing.expect(true); |
| ... | @@ -36,8 +32,6 @@ usingnamespace struct { | ... | @@ -36,8 +32,6 @@ usingnamespace struct { |
| 36 | }; | 32 | }; |
| 37 | 33 | ||
| 38 | test "usingnamespace does not redeclare an imported variable" { | 34 | test "usingnamespace does not redeclare an imported variable" { |
| 39 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 40 | |||
| 41 | comptime try std.testing.expect(@This().foo == 42); | 35 | comptime try std.testing.expect(@This().foo == 42); |
| 42 | } | 36 | } |
| 43 | 37 | ||
| ... | @@ -54,8 +48,6 @@ fn privateFunction() bool { | ... | @@ -54,8 +48,6 @@ fn privateFunction() bool { |
| 54 | } | 48 | } |
| 55 | 49 | ||
| 56 | test { | 50 | test { |
| 57 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 58 | |||
| 59 | _ = @import("usingnamespace/import_segregation.zig"); | 51 | _ = @import("usingnamespace/import_segregation.zig"); |
| 60 | } | 52 | } |
| 61 | 53 |
test/behavior/while.zig-2| ... | @@ -247,8 +247,6 @@ fn returnTrue() bool { | ... | @@ -247,8 +247,6 @@ fn returnTrue() bool { |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | test "return with implicit cast from while loop" { | 249 | test "return with implicit cast from while loop" { |
| 250 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | ||
| 251 | |||
| 252 | returnWithImplicitCastFromWhileLoopTest() catch unreachable; | 250 | returnWithImplicitCastFromWhileLoopTest() catch unreachable; |
| 253 | } | 251 | } |
| 254 | fn returnWithImplicitCastFromWhileLoopTest() anyerror!void { | 252 | fn returnWithImplicitCastFromWhileLoopTest() anyerror!void { |