authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-09 09:10:32+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-10 08:36:08+02:00
log1b2f003f06b5686326da6910def307170e2293e6
treec03fa6bc7f39f4f7550f76dee0574b29d5e8db77
parent4fb39f82c2a5a57b497c741093e95e1e8e1a57fe
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: move issue_7030 from test-standalone simple cases to test-cases


3 files changed, 25 insertions(+), 28 deletions(-)

test/cases/custom_logfn_freestanding.zig created+25
......@@ -0,0 +1,25 @@
1const std = @import("std");
2
3pub const std_options: std.Options = .{
4 .logFn = log,
5};
6
7pub fn log(
8 comptime message_level: std.log.Level,
9 comptime scope: @EnumLiteral(),
10 comptime format: []const u8,
11 args: anytype,
12) void {
13 _ = message_level;
14 _ = scope;
15 _ = format;
16 _ = args;
17}
18
19pub fn main() anyerror!void {
20 std.log.info("All your codebase are belong to us.", .{});
21}
22
23// compile
24// output_mode=Exe
25// target=wasm32-freestanding
test/standalone/simple/build.zig-7
......@@ -97,13 +97,6 @@ const cases = [_]Case{
9797 .{
9898 .src_path = "cat/main.zig",
9999 },
100 .{
101 .src_path = "issue_7030.zig",
102 .target = .{
103 .cpu_arch = .wasm32,
104 .os_tag = .freestanding,
105 },
106 },
107100 .{ .src_path = "guess_number/main.zig" },
108101 .{ .src_path = "std_enums_big_enums.zig" },
109102};
test/standalone/simple/issue_7030.zig deleted-21
......@@ -1,21 +0,0 @@
1const std = @import("std");
2
3pub const std_options: std.Options = .{
4 .logFn = log,
5};
6
7pub fn log(
8 comptime message_level: std.log.Level,
9 comptime scope: @EnumLiteral(),
10 comptime format: []const u8,
11 args: anytype,
12) void {
13 _ = message_level;
14 _ = scope;
15 _ = format;
16 _ = args;
17}
18
19pub fn main() anyerror!void {
20 std.log.info("All your codebase are belong to us.", .{});
21}