zig/test/behavior/bugs/11816.zig
Cody Tapscott 83e2d3fb37 stage1: Skip new tests that never passed in stage1
This gets the behavior tests passing for stage1 again.
2022-10-13 12:53:20 -07:00

15 lines
383 B
Zig

const std = @import("std");
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) {
1 => break 2,
else => x -= 1,
};
try std.testing.expect(val == 2);
}