mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
update all incremental tests to new std API
they're still not passing on windows for some reason though
This commit is contained in:
@@ -11,13 +11,14 @@ pub fn main() !void {
|
||||
try foo(&val);
|
||||
}
|
||||
fn foo(val: *const S) !void {
|
||||
var stdout_writer = std.Io.File.stdout().writerStreaming(&.{});
|
||||
var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
|
||||
try stdout_writer.interface.print(
|
||||
"{d} {d}\n",
|
||||
.{ val.x, val.y },
|
||||
);
|
||||
}
|
||||
const std = @import("std");
|
||||
const io = std.Io.Threaded.global_single_threaded.ioBasic();
|
||||
#expect_stdout="100 200\n"
|
||||
|
||||
#update=change struct layout
|
||||
@@ -28,13 +29,14 @@ pub fn main() !void {
|
||||
try foo(&val);
|
||||
}
|
||||
fn foo(val: *const S) !void {
|
||||
var stdout_writer = std.Io.File.stdout().writerStreaming(&.{});
|
||||
var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
|
||||
try stdout_writer.interface.print(
|
||||
"{d} {d}\n",
|
||||
.{ val.x, val.y },
|
||||
);
|
||||
}
|
||||
const std = @import("std");
|
||||
const io = std.Io.Threaded.global_single_threaded.ioBasic();
|
||||
#expect_stdout="100 200\n"
|
||||
|
||||
#update=change values
|
||||
@@ -45,11 +47,12 @@ pub fn main() !void {
|
||||
try foo(&val);
|
||||
}
|
||||
fn foo(val: *const S) !void {
|
||||
var stdout_writer = std.Io.File.stdout().writerStreaming(&.{});
|
||||
var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
|
||||
try stdout_writer.interface.print(
|
||||
"{d} {d}\n",
|
||||
.{ val.x, val.y },
|
||||
);
|
||||
}
|
||||
const std = @import("std");
|
||||
const io = std.Io.Threaded.global_single_threaded.ioBasic();
|
||||
#expect_stdout="1234 5678\n"
|
||||
|
||||
Reference in New Issue
Block a user