commit 83e2d3fb3701d77c8177f7b2b164cbd7c790a3ed (tree)
parent f5f28e0d2c49d5c62914edf0bff8f1941eef721f
Author: Cody Tapscott <topolarity@tapscott.me>
Date: Sat, 8 Oct 2022 11:29:49 -0700
stage1: Skip new tests that never passed in stage1
This gets the behavior tests passing for stage1 again.
Diffstat:
9 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/test/behavior.zig b/test/behavior.zig
@@ -89,7 +89,6 @@ test {
_ = @import("behavior/bugs/12551.zig");
_ = @import("behavior/bugs/12644.zig");
_ = @import("behavior/bugs/12680.zig");
- _ = @import("behavior/bugs/12776.zig");
_ = @import("behavior/bugs/12786.zig");
_ = @import("behavior/bugs/12794.zig");
_ = @import("behavior/bugs/12801-1.zig");
@@ -187,6 +186,8 @@ test {
_ = @import("behavior/packed_struct_explicit_backing_int.zig");
_ = @import("behavior/empty_union.zig");
_ = @import("behavior/inline_switch.zig");
+ _ = @import("behavior/bugs/12723.zig");
+ _ = @import("behavior/bugs/12776.zig");
}
if (builtin.os.tag != .wasi) {
diff --git 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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;