update standalone and incremental tests to new API

This commit is contained in:
Andrew Kelley
2025-07-07 19:33:20 -07:00
parent c873c2eed9
commit d8e26275f2
72 changed files with 347 additions and 892 deletions

View File

@@ -374,7 +374,8 @@
<p>
Most of the time, it is more appropriate to write to stderr rather than stdout, and
whether or not the message is successfully written to the stream is irrelevant.
For this common case, there is a simpler API:
Also, formatted printing often comes in handy. For this common case,
there is a simpler API:
</p>
{#code|hello_again.zig#}

View File

@@ -17,7 +17,7 @@ pub fn main() !void {
.maximum = 0.20,
};
const category = threshold.categorize(0.90);
try std.io.getStdOut().writeAll(@tagName(category));
try std.fs.File.stdout().writeAll(@tagName(category));
}
const std = @import("std");

View File

@@ -1,8 +1,7 @@
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("Hello, {s}!\n", .{"world"});
try std.fs.File.stdout().writeAll("Hello, World!\n");
}
// exe=succeed

View File

@@ -1,7 +1,7 @@
const std = @import("std");
pub fn main() void {
std.debug.print("Hello, world!\n", .{});
std.debug.print("Hello, {s}!\n", .{"World"});
}
// exe=succeed