| 1 | #update=initial version |
| 2 | #file=main.zig |
| 3 | const std = @import("std"); |
| 4 | pub fn main() !void { |
| 5 | try std.Io.File.stdout().writeStreamingAll(io, foo); |
| 6 | } |
| 7 | const foo = "good morning\n"; |
| 8 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 9 | #expect_stdout="good morning\n" |
| 10 | |
| 11 | #update=add new declaration |
| 12 | #file=main.zig |
| 13 | const std = @import("std"); |
| 14 | pub fn main() !void { |
| 15 | try std.Io.File.stdout().writeStreamingAll(io, foo); |
| 16 | } |
| 17 | const foo = "good morning\n"; |
| 18 | const bar = "good evening\n"; |
| 19 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 20 | #expect_stdout="good morning\n" |
| 21 | |
| 22 | #update=reference new declaration |
| 23 | #file=main.zig |
| 24 | const std = @import("std"); |
| 25 | pub fn main() !void { |
| 26 | try std.Io.File.stdout().writeStreamingAll(io, bar); |
| 27 | } |
| 28 | const foo = "good morning\n"; |
| 29 | const bar = "good evening\n"; |
| 30 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 31 | #expect_stdout="good evening\n" |
| 32 | |
| 33 | #update=reference missing declaration |
| 34 | #file=main.zig |
| 35 | const std = @import("std"); |
| 36 | pub fn main() !void { |
| 37 | try std.Io.File.stdout().writeStreamingAll(io, qux); |
| 38 | } |
| 39 | const foo = "good morning\n"; |
| 40 | const bar = "good evening\n"; |
| 41 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 42 | #expect_error=main.zig:3:52: error: use of undeclared identifier 'qux' |
| 43 | |
| 44 | #update=add missing declaration |
| 45 | #file=main.zig |
| 46 | const std = @import("std"); |
| 47 | pub fn main() !void { |
| 48 | try std.Io.File.stdout().writeStreamingAll(io, qux); |
| 49 | } |
| 50 | const foo = "good morning\n"; |
| 51 | const bar = "good evening\n"; |
| 52 | const qux = "good night\n"; |
| 53 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 54 | #expect_stdout="good night\n" |
| 55 | |
| 56 | #update=remove unused declarations |
| 57 | #file=main.zig |
| 58 | const std = @import("std"); |
| 59 | pub fn main() !void { |
| 60 | try std.Io.File.stdout().writeStreamingAll(io, qux); |
| 61 | } |
| 62 | const qux = "good night\n"; |
| 63 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 64 | #expect_stdout="good night\n" |