From ffd30dbe28efce0b971d69df06ab684ceef0f881 Mon Sep 17 00:00:00 2001 From: Benjamin Feng Date: Wed, 29 Jan 2020 15:30:13 -0600 Subject: [PATCH] Fix stage1 test --- test/stage1/behavior/const_slice_child.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/stage1/behavior/const_slice_child.zig b/test/stage1/behavior/const_slice_child.zig index 848a4780e5..7d969ae468 100644 --- a/test/stage1/behavior/const_slice_child.zig +++ b/test/stage1/behavior/const_slice_child.zig @@ -1,6 +1,7 @@ const std = @import("std"); const debug = std.debug; -const expect = std.testing.expect; +const testing = std.testing; +const expect = testing.expect; var argv: [*]const [*]const u8 = undefined; @@ -23,6 +24,7 @@ fn foo(args: [][]const u8) void { fn bar(argc: usize) void { const args = testing.leak_count_allocator.alloc([]const u8, argc) catch unreachable; + defer testing.leak_count_allocator.free(args); for (args) |_, i| { const ptr = argv[i]; args[i] = ptr[0..strlen(ptr)];