update test cases

This commit is contained in:
Andrew Kelley 2025-12-23 22:14:09 -08:00
parent fa79d34674
commit 6dbc95fb1f

View file

@ -8,13 +8,13 @@ pub fn main() !void {
var stdout = std.Io.File.stdout().writer(std.Options.debug_io, &buf);
const captured_st = try foo(&stdout.interface, &st_buf);
try std.debug.writeStackTrace(&captured_st, &stdout.interface, .no_color);
try std.debug.writeStackTrace(&captured_st, .{ .writer = &stdout.interface, .mode = .no_color });
try stdout.interface.print("stack trace index: {d}\n", .{captured_st.index});
try stdout.interface.flush();
}
fn foo(w: *std.Io.Writer, st_buf: []usize) !std.builtin.StackTrace {
try std.debug.writeCurrentStackTrace(.{}, w, .no_color);
try std.debug.writeCurrentStackTrace(.{}, .{ .writer = w, .mode = .no_color });
return std.debug.captureCurrentStackTrace(.{}, st_buf);
}