authorgravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-10-08 11:29:49-07:00
committergravatar for topolarity@tapscott.meCody Tapscott <topolarity@tapscott.me> 2022-10-13 12:53:20-07:00
log83e2d3fb3701d77c8177f7b2b164cbd7c790a3ed
treef6e16b6d0405bd9760857435f3c162b464554927
parentf5f28e0d2c49d5c62914edf0bff8f1941eef721f

stage1: Skip new tests that never passed in stage1

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,7 +89,6 @@ test {
89 _ = @import("behavior/bugs/12551.zig");89 _ = @import("behavior/bugs/12551.zig");
90 _ = @import("behavior/bugs/12644.zig");90 _ = @import("behavior/bugs/12644.zig");
91 _ = @import("behavior/bugs/12680.zig");91 _ = @import("behavior/bugs/12680.zig");
92 _ = @import("behavior/bugs/12776.zig");
93 _ = @import("behavior/bugs/12786.zig");92 _ = @import("behavior/bugs/12786.zig");
94 _ = @import("behavior/bugs/12794.zig");93 _ = @import("behavior/bugs/12794.zig");
95 _ = @import("behavior/bugs/12801-1.zig");94 _ = @import("behavior/bugs/12801-1.zig");
...@@ -187,6 +186,8 @@ test {...@@ -187,6 +186,8 @@ test {
187 _ = @import("behavior/packed_struct_explicit_backing_int.zig");186 _ = @import("behavior/packed_struct_explicit_backing_int.zig");
188 _ = @import("behavior/empty_union.zig");187 _ = @import("behavior/empty_union.zig");
189 _ = @import("behavior/inline_switch.zig");188 _ = @import("behavior/inline_switch.zig");
189 _ = @import("behavior/bugs/12723.zig");
190 _ = @import("behavior/bugs/12776.zig");
190 }191 }
191192
192 if (builtin.os.tag != .wasi) {193 if (builtin.os.tag != .wasi) {
test/behavior/align.zig+2
...@@ -566,6 +566,8 @@ test "@alignCast null" {...@@ -566,6 +566,8 @@ test "@alignCast null" {
566}566}
567567
568test "alignment of slice element" {568test "alignment of slice element" {
569 if (builtin.zig_backend == .stage1) return error.SkipZigTest;
570
569 const a: []align(1024) const u8 = undefined;571 const a: []align(1024) const u8 = undefined;
570 try expect(@TypeOf(&a[0]) == *align(1024) const u8);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,6 +3,7 @@ const builtin = @import("builtin");
33
4test {4test {
5 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO5 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
6 if (builtin.zig_backend == .stage1) return error.SkipZigTest;
67
7 var x: u32 = 3;8 var x: u32 = 3;
8 const val: usize = while (true) switch (x) {9 const val: usize = while (true) switch (x) {
test/behavior/bugs/12723.zig created+11
...@@ -0,0 +1,11 @@
1const 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.
6test "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,6 +8,7 @@ fn capacity_() u64 {
88
9test {9test {
10 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO10 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
11 if (builtin.zig_backend == .stage1) return error.SkipZigTest;
1112
12 try std.testing.expect((@This(){}).capacity() == 64);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,6 +14,7 @@ const Auto = struct {
14 }14 }
15};15};
16test {16test {
17 if (builtin.zig_backend == .stage1) return error.SkipZigTest;
17 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO18 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
18 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO19 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
19 if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO20 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,10 +1169,3 @@ test "Non-exhaustive enum with nonstandard int size behaves correctly" {
1169 const E = enum(u15) { _ };1169 const E = enum(u15) { _ };
1170 try expect(@sizeOf(E) == @sizeOf(u15));1170 try expect(@sizeOf(E) == @sizeOf(u15));
1171}1171}
1172
1173test "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,6 +1339,8 @@ test "lazy value is resolved as slice operand" {
1339}1339}
13401340
1341test "break from inline loop depends on runtime condition" {1341test "break from inline loop depends on runtime condition" {
1342 if (builtin.zig_backend == .stage1) return error.SkipZigTest;
1343
1342 const S = struct {1344 const S = struct {
1343 fn foo(a: u8) bool {1345 fn foo(a: u8) bool {
1344 return a == 4;1346 return a == 4;
test/behavior/packed-struct.zig+1
...@@ -585,6 +585,7 @@ test "runtime init of unnamed packed struct type" {...@@ -585,6 +585,7 @@ test "runtime init of unnamed packed struct type" {
585}585}
586586
587test "packed struct passed to callconv(.C) function" {587test "packed struct passed to callconv(.C) function" {
588 if (builtin.zig_backend == .stage1) return error.SkipZigTest;
588 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;589 if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
589 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;590 if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
590 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;591 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest;