| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const debug = std.debug; |
| 3 | | const expect = std.testing.expect; |
| 3 | const testing = std.testing; |
| 4 | const expect = testing.expect; |
| 4 | 5 | |
| 5 | 6 | var argv: [*]const [*]const u8 = undefined; |
| 6 | 7 | |
| ... | ... | @@ -23,6 +24,7 @@ fn foo(args: [][]const u8) void { |
| 23 | 24 | |
| 24 | 25 | fn bar(argc: usize) void { |
| 25 | 26 | const args = testing.leak_count_allocator.alloc([]const u8, argc) catch unreachable; |
| 27 | defer testing.leak_count_allocator.free(args); |
| 26 | 28 | for (args) |_, i| { |
| 27 | 29 | const ptr = argv[i]; |
| 28 | 30 | args[i] = ptr[0..strlen(ptr)]; |