| author | |
| committer | |
| log | 83e2d3fb3701d77c8177f7b2b164cbd7c790a3ed |
| tree | f6e16b6d0405bd9760857435f3c162b464554927 |
| parent | f5f28e0d2c49d5c62914edf0bff8f1941eef721f |
This gets the behavior tests passing for stage1 again.9 files changed, 21 insertions(+), 8 deletions(-)
test/behavior.zig+2-1| ... | ... | @@ -89,7 +89,6 @@ test { |
| 89 | 89 | _ = @import("behavior/bugs/12551.zig"); |
| 90 | 90 | _ = @import("behavior/bugs/12644.zig"); |
| 91 | 91 | _ = @import("behavior/bugs/12680.zig"); |
| 92 | _ = @import("behavior/bugs/12776.zig"); | |
| 93 | 92 | _ = @import("behavior/bugs/12786.zig"); |
| 94 | 93 | _ = @import("behavior/bugs/12794.zig"); |
| 95 | 94 | _ = @import("behavior/bugs/12801-1.zig"); |
| ... | ... | @@ -187,6 +186,8 @@ test { |
| 187 | 186 | _ = @import("behavior/packed_struct_explicit_backing_int.zig"); |
| 188 | 187 | _ = @import("behavior/empty_union.zig"); |
| 189 | 188 | _ = @import("behavior/inline_switch.zig"); |
| 189 | _ = @import("behavior/bugs/12723.zig"); | |
| 190 | _ = @import("behavior/bugs/12776.zig"); | |
| 190 | 191 | } |
| 191 | 192 | |
| 192 | 193 | if (builtin.os.tag != .wasi) { |
test/behavior/align.zig+2| ... | ... | @@ -566,6 +566,8 @@ test "@alignCast null" { |
| 566 | 566 | } |
| 567 | 567 | |
| 568 | 568 | test "alignment of slice element" { |
| 569 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 570 | ||
| 569 | 571 | const a: []align(1024) const u8 = undefined; |
| 570 | 572 | try expect(@TypeOf(&a[0]) == *align(1024) const u8); |
| 571 | 573 | } |
test/behavior/bugs/11816.zig+1| ... | ... | @@ -3,6 +3,7 @@ const builtin = @import("builtin"); |
| 3 | 3 | |
| 4 | 4 | test { |
| 5 | 5 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 6 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 6 | 7 | |
| 7 | 8 | var x: u32 = 3; |
| 8 | 9 | const val: usize = while (true) switch (x) { |
test/behavior/bugs/12723.zig created+11| ... | ... | @@ -0,0 +1,11 @@ |
| 1 | const expect = @import("std").testing.expect; | |
| 2 | ||
| 3 | // This test causes a compile error on stage1 regardless of whether | |
| 4 | // the body of the test is comptime-gated or not. To workaround this, | |
| 5 | // we gate the inclusion of the test file. | |
| 6 | test "Non-exhaustive enum backed by comptime_int" { | |
| 7 | const E = enum(comptime_int) { a, b, c, _ }; | |
| 8 | comptime var e: E = .a; | |
| 9 | e = @intToEnum(E, 378089457309184723749); | |
| 10 | try expect(@enumToInt(e) == 378089457309184723749); | |
| 11 | } |
test/behavior/bugs/12801-1.zig+1| ... | ... | @@ -8,6 +8,7 @@ fn capacity_() u64 { |
| 8 | 8 | |
| 9 | 9 | test { |
| 10 | 10 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 11 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 11 | 12 | |
| 12 | 13 | try std.testing.expect((@This(){}).capacity() == 64); |
| 13 | 14 | } |
test/behavior/bugs/12801-2.zig+1| ... | ... | @@ -14,6 +14,7 @@ const Auto = struct { |
| 14 | 14 | } |
| 15 | 15 | }; |
| 16 | 16 | test { |
| 17 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 17 | 18 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 18 | 19 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 19 | 20 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO |
test/behavior/enum.zig-7| ... | ... | @@ -1169,10 +1169,3 @@ test "Non-exhaustive enum with nonstandard int size behaves correctly" { |
| 1169 | 1169 | const E = enum(u15) { _ }; |
| 1170 | 1170 | try expect(@sizeOf(E) == @sizeOf(u15)); |
| 1171 | 1171 | } |
| 1172 | ||
| 1173 | test "Non-exhaustive enum backed by comptime_int" { | |
| 1174 | const E = enum(comptime_int) { a, b, c, _ }; | |
| 1175 | comptime var e: E = .a; | |
| 1176 | e = @intToEnum(E, 378089457309184723749); | |
| 1177 | try expect(@enumToInt(e) == 378089457309184723749); | |
| 1178 | } |
test/behavior/eval.zig+2| ... | ... | @@ -1339,6 +1339,8 @@ test "lazy value is resolved as slice operand" { |
| 1339 | 1339 | } |
| 1340 | 1340 | |
| 1341 | 1341 | test "break from inline loop depends on runtime condition" { |
| 1342 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 1343 | ||
| 1342 | 1344 | const S = struct { |
| 1343 | 1345 | fn foo(a: u8) bool { |
| 1344 | 1346 | return a == 4; |
test/behavior/packed-struct.zig+1| ... | ... | @@ -585,6 +585,7 @@ test "runtime init of unnamed packed struct type" { |
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | test "packed struct passed to callconv(.C) function" { |
| 588 | if (builtin.zig_backend == .stage1) return error.SkipZigTest; | |
| 588 | 589 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 589 | 590 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 590 | 591 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |