|
| 1 | +#target=x86_64-linux-selfhosted |
| 2 | +#target=x86_64-linux-cbe |
| 3 | +#target=x86_64-windows-cbe |
| 4 | +//#target=wasm32-wasi-selfhosted |
| 5 | +#update=initial version |
| 6 | +#file=main.zig |
| 7 | +const std = @import("std"); |
| 8 | +pub fn main() !void { |
| 9 | + try std.io.getStdOut().writeAll(@This().foo); |
| 10 | +} |
| 11 | +const foo = "good morning\n"; |
| 12 | +#expect_stdout="good morning\n" |
| 13 | + |
| 14 | +#update=add new declaration |
| 15 | +#file=main.zig |
| 16 | +const std = @import("std"); |
| 17 | +pub fn main() !void { |
| 18 | + try std.io.getStdOut().writeAll(@This().foo); |
| 19 | +} |
| 20 | +const foo = "good morning\n"; |
| 21 | +const bar = "good evening\n"; |
| 22 | +#expect_stdout="good morning\n" |
| 23 | + |
| 24 | +#update=reference new declaration |
| 25 | +#file=main.zig |
| 26 | +const std = @import("std"); |
| 27 | +pub fn main() !void { |
| 28 | + try std.io.getStdOut().writeAll(@This().bar); |
| 29 | +} |
| 30 | +const foo = "good morning\n"; |
| 31 | +const bar = "good evening\n"; |
| 32 | +#expect_stdout="good evening\n" |
| 33 | + |
| 34 | +#update=reference missing declaration |
| 35 | +#file=main.zig |
| 36 | +const std = @import("std"); |
| 37 | +pub fn main() !void { |
| 38 | + try std.io.getStdOut().writeAll(@This().qux); |
| 39 | +} |
| 40 | +const foo = "good morning\n"; |
| 41 | +const bar = "good evening\n"; |
| 42 | +#expect_error=ignored |
| 43 | + |
| 44 | +#update=add missing declaration |
| 45 | +#file=main.zig |
| 46 | +const std = @import("std"); |
| 47 | +pub fn main() !void { |
| 48 | + try std.io.getStdOut().writeAll(@This().qux); |
| 49 | +} |
| 50 | +const foo = "good morning\n"; |
| 51 | +const bar = "good evening\n"; |
| 52 | +const qux = "good night\n"; |
| 53 | +#expect_stdout="good night\n" |
| 54 | + |
| 55 | +#update=remove unused declarations |
| 56 | +#file=main.zig |
| 57 | +const std = @import("std"); |
| 58 | +pub fn main() !void { |
| 59 | + try std.io.getStdOut().writeAll(@This().qux); |
| 60 | +} |
| 61 | +const qux = "good night\n"; |
| 62 | +#expect_stdout="good night\n" |
0 commit comments