diff options
| author | Cody Tapscott <topolarity@tapscott.me> | 2022-10-08 11:29:49 -0700 |
|---|---|---|
| committer | Cody Tapscott <topolarity@tapscott.me> | 2022-10-13 12:53:20 -0700 |
| commit | 83e2d3fb3701d77c8177f7b2b164cbd7c790a3ed (patch) | |
| tree | f6e16b6d0405bd9760857435f3c162b464554927 /test/behavior | |
| parent | f5f28e0d2c49d5c62914edf0bff8f1941eef721f (diff) | |
| download | zig-83e2d3fb3701d77c8177f7b2b164cbd7c790a3ed.tar.gz zig-83e2d3fb3701d77c8177f7b2b164cbd7c790a3ed.zip | |
stage1: Skip new tests that never passed in stage1
This gets the behavior tests passing for stage1 again.
Diffstat (limited to 'test/behavior')
| -rw-r--r-- | test/behavior/align.zig | 2 | ||||
| -rw-r--r-- | test/behavior/bugs/11816.zig | 1 | ||||
| -rw-r--r-- | test/behavior/bugs/12723.zig | 11 | ||||
| -rw-r--r-- | test/behavior/bugs/12801-1.zig | 1 | ||||
| -rw-r--r-- | test/behavior/bugs/12801-2.zig | 1 | ||||
| -rw-r--r-- | test/behavior/enum.zig | 7 | ||||
| -rw-r--r-- | test/behavior/eval.zig | 2 | ||||
| -rw-r--r-- | test/behavior/packed-struct.zig | 1 |
8 files changed, 19 insertions, 7 deletions
diff --git a/test/behavior/align.zig b/test/behavior/align.zig index a131cc8df7..2ebdda341a 100644 --- a/test/behavior/align.zig +++ b/test/behavior/align.zig @@ -566,6 +566,8 @@ test "@alignCast null" { } test "alignment of slice element" { + if (builtin.zig_backend == .stage1) return error.SkipZigTest; + const a: []align(1024) const u8 = undefined; try expect(@TypeOf(&a[0]) == *align(1024) const u8); } diff --git a/test/behavior/bugs/11816.zig b/test/behavior/bugs/11816.zig index 639212e098..5b6c9bd319 100644 --- a/test/behavior/bugs/11816.zig +++ b/test/behavior/bugs/11816.zig @@ -3,6 +3,7 @@ const builtin = @import("builtin"); test { if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage1) return error.SkipZigTest; var x: u32 = 3; const val: usize = while (true) switch (x) { diff --git a/test/behavior/bugs/12723.zig b/test/behavior/bugs/12723.zig new file mode 100644 index 0000000000..6768444545 --- /dev/null +++ b/test/behavior/bugs/12723.zig @@ -0,0 +1,11 @@ +const expect = @import("std").testing.expect; + +// This test causes a compile error on stage1 regardless of whether +// the body of the test is comptime-gated or not. To workaround this, +// we gate the inclusion of the test file. +test "Non-exhaustive enum backed by comptime_int" { + const E = enum(comptime_int) { a, b, c, _ }; + comptime var e: E = .a; + e = @intToEnum(E, 378089457309184723749); + try expect(@enumToInt(e) == 378089457309184723749); +} diff --git a/test/behavior/bugs/12801-1.zig b/test/behavior/bugs/12801-1.zig index ff94382d1f..b1f565e47f 100644 --- a/test/behavior/bugs/12801-1.zig +++ b/test/behavior/bugs/12801-1.zig @@ -8,6 +8,7 @@ fn capacity_() u64 { test { if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage1) return error.SkipZigTest; try std.testing.expect((@This(){}).capacity() == 64); } diff --git a/test/behavior/bugs/12801-2.zig b/test/behavior/bugs/12801-2.zig index f98fcfbcff..298e4f96c1 100644 --- a/test/behavior/bugs/12801-2.zig +++ b/test/behavior/bugs/12801-2.zig @@ -14,6 +14,7 @@ const Auto = struct { } }; test { + if (builtin.zig_backend == .stage1) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO diff --git a/test/behavior/enum.zig b/test/behavior/enum.zig index 114090c78e..5cb89ffa32 100644 --- a/test/behavior/enum.zig +++ b/test/behavior/enum.zig @@ -1169,10 +1169,3 @@ test "Non-exhaustive enum with nonstandard int size behaves correctly" { const E = enum(u15) { _ }; try expect(@sizeOf(E) == @sizeOf(u15)); } - -test "Non-exhaustive enum backed by comptime_int" { - const E = enum(comptime_int) { a, b, c, _ }; - comptime var e: E = .a; - e = @intToEnum(E, 378089457309184723749); - try expect(@enumToInt(e) == 378089457309184723749); -} diff --git a/test/behavior/eval.zig b/test/behavior/eval.zig index da93ebc831..c2d3162919 100644 --- a/test/behavior/eval.zig +++ b/test/behavior/eval.zig @@ -1339,6 +1339,8 @@ test "lazy value is resolved as slice operand" { } test "break from inline loop depends on runtime condition" { + if (builtin.zig_backend == .stage1) return error.SkipZigTest; + const S = struct { fn foo(a: u8) bool { return a == 4; diff --git a/test/behavior/packed-struct.zig b/test/behavior/packed-struct.zig index 46adee083d..5a878112b5 100644 --- a/test/behavior/packed-struct.zig +++ b/test/behavior/packed-struct.zig @@ -585,6 +585,7 @@ test "runtime init of unnamed packed struct type" { } test "packed struct passed to callconv(.C) function" { + if (builtin.zig_backend == .stage1) return error.SkipZigTest; if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
