update standalone and incremental tests to new API
This commit is contained in:
@@ -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#}
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user