mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05: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:
1 parent
583b843803
commit
f950f5452b
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user