mirror of
https://github.com/ziglang/zig.git
synced 2025-02-15 17:10:16 +00:00
stage1: Skip new tests that never passed in stage1
This gets the behavior tests passing for stage1 again.
This commit is contained in:
parent
f5f28e0d2c
commit
83e2d3fb37
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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) {
|
||||
|
11
test/behavior/bugs/12723.zig
Normal file
11
test/behavior/bugs/12723.zig
Normal file
@ -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);
|
||||
}
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user