mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
test_runner: don't assume the GeneralPurposeAllocator config
This allows changing the config in only 1 location (std.testing)
This commit is contained in:
parent
583b843803
commit
f950f5452b
@ -23,7 +23,7 @@ pub fn main() anyerror!void {
|
||||
|
||||
var leaks: usize = 0;
|
||||
for (test_fn_list) |test_fn, i| {
|
||||
std.testing.allocator_instance = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
std.testing.allocator_instance = .{};
|
||||
defer {
|
||||
if (std.testing.allocator_instance.deinit()) {
|
||||
leaks += 1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user