mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 01:24:49 +01:00
test-stack-traces: update to new main API
This commit is contained in:
parent
b32a38ad27
commit
84da158afb
1 changed files with 4 additions and 11 deletions
|
|
@ -24,20 +24,13 @@
|
|||
//!
|
||||
//! With these transformations, the test harness can safely do string comparisons.
|
||||
|
||||
pub fn main() !void {
|
||||
var arena_instance: std.heap.ArenaAllocator = .init(std.heap.page_allocator);
|
||||
defer arena_instance.deinit();
|
||||
const arena = arena_instance.allocator();
|
||||
pub fn main(init: std.process.Init) !void {
|
||||
const arena = init.arena.allocator();
|
||||
const io = init.io;
|
||||
const args = try init.minimal.args.toSlice(arena);
|
||||
|
||||
const args = try std.process.argsAlloc(arena);
|
||||
if (args.len != 2) std.process.fatal("usage: convert-stack-trace path/to/test/output", .{});
|
||||
|
||||
const gpa = arena;
|
||||
|
||||
var threaded: std.Io.Threaded = .init(gpa, .{});
|
||||
defer threaded.deinit();
|
||||
const io = threaded.io();
|
||||
|
||||
var read_buf: [1024]u8 = undefined;
|
||||
var write_buf: [1024]u8 = undefined;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue