1#update=initial version with no compile log
2#file=main.zig
3const std = @import("std");
4pub fn main() !void {
5 try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n");
6}
7const io = std.Io.Threaded.global_single_threaded.io();
8#expect_stdout="Hello, World!\n"
9
10#update=add compile log
11#file=main.zig
12const std = @import("std");
13pub fn main() !void {
14 try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n");
15 @compileLog("this is a log");
16}
17const 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
23const std = @import("std");
24pub fn main() !void {
25 try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n");
26}
27const io = std.Io.Threaded.global_single_threaded.io();
28#expect_stdout="Hello, World!\n"