zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit ffd30dbe28efce0b971d69df06ab684ceef0f881 (tree)
parent c4e6e5fad600f9277ce2cd76b7f2cf85922c6fd3
Author: Benjamin Feng <benjamin.feng@glassdoor.com>
Date:   Wed, 29 Jan 2020 15:30:13 -0600

Fix stage1 test

Diffstat:
Mtest/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 @@ -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)];