blob: 697bb26569a727fe528329df27f2b8b05c32a510 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#target=x86_64-linux-selfhosted
#target=x86_64-windows-selfhosted
#target=x86_64-linux-cbe
#target=x86_64-windows-cbe
#target=wasm32-wasi-selfhosted
#update=initial version with no compile log
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll("Hello, World!\n");
}
#expect_stdout="Hello, World!\n"
#update=add compile log
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll("Hello, World!\n");
@compileLog("this is a log");
}
#expect_error=main.zig:4:5: error: found compile log statement
#expect_compile_log=@as(*const [13:0]u8, "this is a log")
#update=remove compile log
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.fs.File.stdout().writeAll("Hello, World!\n");
}
#expect_stdout="Hello, World!\n"
|