mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
14ccbbef9f
Throw another target in there just to spice things up a little! Running the incremental cases with the C backend is pretty slow due to the need to recompile the whole output from scratch on every update; for this reason, we probably don't want to keep many of these targeting CBE long-term. However, for now, while we have relatively few tests and things are still changing quite a lot, it's better to have this little bit of extra test coverage.
26 lines
583 B
Plaintext
26 lines
583 B
Plaintext
#target=x86_64-linux-selfhosted
|
|
#target=x86_64-linux-cbe
|
|
#target=x86_64-windows-cbe
|
|
#update=initial version
|
|
#file=main.zig
|
|
const MyEnum = enum(u8) {
|
|
foo = 1,
|
|
bar = 2,
|
|
};
|
|
pub fn main() !void {
|
|
try std.io.getStdOut().writer().print("{}\n", .{@intFromEnum(MyEnum.foo)});
|
|
}
|
|
const std = @import("std");
|
|
#expect_stdout="1\n"
|
|
#update=remove enum field
|
|
#file=main.zig
|
|
const MyEnum = enum(u8) {
|
|
//foo = 1,
|
|
bar = 2,
|
|
};
|
|
pub fn main() !void {
|
|
try std.io.getStdOut().writer().print("{}\n", .{@intFromEnum(MyEnum.foo)});
|
|
}
|
|
const std = @import("std");
|
|
#expect_error=ignored
|