| 1 | #update=initial version with no compile log |
| 2 | #file=main.zig |
| 3 | const std = @import("std"); |
| 4 | pub fn main() !void { |
| 5 | try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n"); |
| 6 | } |
| 7 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 8 | #expect_stdout="Hello, World!\n" |
| 9 | |
| 10 | #update=add compile log |
| 11 | #file=main.zig |
| 12 | const std = @import("std"); |
| 13 | pub fn main() !void { |
| 14 | try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n"); |
| 15 | @compileLog("this is a log"); |
| 16 | } |
| 17 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 18 | #expect_error=main.zig:4:5: error: found compile log statement |
| 19 | #expect_compile_log=@as(*const [13:0]u8, "this is a log") |
| 20 | |
| 21 | #update=remove compile log |
| 22 | #file=main.zig |
| 23 | const std = @import("std"); |
| 24 | pub fn main() !void { |
| 25 | try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n"); |
| 26 | } |
| 27 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 28 | #expect_stdout="Hello, World!\n" |