zig/test/incremental/unreferenced_error
mlugg 14ccbbef9f
test: add x86_64-windows-cbe target to incremental cases
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.
2024-10-05 20:52:26 +01:00

40 lines
944 B
Text

#target=x86_64-linux-selfhosted
#target=x86_64-linux-cbe
#target=x86_64-windows-cbe
#update=initial version
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.io.getStdOut().writeAll(a);
}
const a = "Hello, World!\n";
#expect_stdout="Hello, World!\n"
#update=introduce compile error
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.io.getStdOut().writeAll(a);
}
const a = @compileError("bad a");
#expect_error=ignored
#update=remove error reference
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.io.getStdOut().writeAll(b);
}
const a = @compileError("bad a");
const b = "Hi there!\n";
#expect_stdout="Hi there!\n"
#update=introduce and remove reference to error
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.io.getStdOut().writeAll(a);
}
const a = "Back to a\n";
const b = @compileError("bad b");
#expect_stdout="Back to a\n"