aboutsummaryrefslogtreecommitdiff
path: root/test/incremental/change_panic_handler_explicit
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-19 20:40:24 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:11 -0800
commitdebf3075942a0a8aa4078ffefc2f1201dd92d72b (patch)
tree51d16aa7b96f1d3989e85ecbfb737e2650bb0c0f /test/incremental/change_panic_handler_explicit
parent77d2ad8c929680ed35fcfe6646f940518a07e7e4 (diff)
downloadzig-debf3075942a0a8aa4078ffefc2f1201dd92d72b.tar.gz
zig-debf3075942a0a8aa4078ffefc2f1201dd92d72b.zip
update all incremental tests to new std API
they're still not passing on windows for some reason though
Diffstat (limited to 'test/incremental/change_panic_handler_explicit')
-rw-r--r--test/incremental/change_panic_handler_explicit9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/incremental/change_panic_handler_explicit b/test/incremental/change_panic_handler_explicit
index 7daa851c8f..366bffca45 100644
--- a/test/incremental/change_panic_handler_explicit
+++ b/test/incremental/change_panic_handler_explicit
@@ -42,11 +42,12 @@ pub const panic = struct {
pub const noreturnReturned = no_panic.noreturnReturned;
};
fn myPanic(msg: []const u8, _: ?usize) noreturn {
- var stdout_writer = std.Io.File.stdout().writerStreaming(&.{});
+ var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
stdout_writer.interface.print("panic message: {s}\n", .{msg}) catch {};
std.process.exit(0);
}
const std = @import("std");
+const io = std.Io.Threaded.global_single_threaded.ioBasic();
#expect_stdout="panic message: integer overflow\n"
#update=change the panic handler body
@@ -89,11 +90,12 @@ pub const panic = struct {
pub const noreturnReturned = no_panic.noreturnReturned;
};
fn myPanic(msg: []const u8, _: ?usize) noreturn {
- var stdout_writer = std.Io.File.stdout().writerStreaming(&.{});
+ var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
stdout_writer.interface.print("new panic message: {s}\n", .{msg}) catch {};
std.process.exit(0);
}
const std = @import("std");
+const io = std.Io.Threaded.global_single_threaded.ioBasic();
#expect_stdout="new panic message: integer overflow\n"
#update=change the panic handler function value
@@ -136,9 +138,10 @@ pub const panic = struct {
pub const noreturnReturned = no_panic.noreturnReturned;
};
fn myPanicNew(msg: []const u8, _: ?usize) noreturn {
- var stdout_writer = std.Io.File.stdout().writerStreaming(&.{});
+ var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
stdout_writer.interface.print("third panic message: {s}\n", .{msg}) catch {};
std.process.exit(0);
}
const std = @import("std");
+const io = std.Io.Threaded.global_single_threaded.ioBasic();
#expect_stdout="third panic message: integer overflow\n"