test_runner: don't assume the GeneralPurposeAllocator config

This allows changing the config in only 1 location (std.testing)
This commit is contained in:
Andrew Kelley 2020-08-18 15:10:31 -07:00
parent 583b843803
commit f950f5452b

View File

@ -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;