| ... | @@ -14,6 +14,11 @@ pub fn main() anyerror!void { | ... | @@ -14,6 +14,11 @@ pub fn main() anyerror!void { |
| 14 | | 14 | |
| 15 | for (test_fn_list) |test_fn, i| { | 15 | for (test_fn_list) |test_fn, i| { |
| 16 | std.testing.allocator_instance.reset(); | 16 | std.testing.allocator_instance.reset(); |
| | 17 | defer { |
| | 18 | std.testing.leak_count_allocator_instance.validate() catch |err| { |
| | 19 | @panic(@errorName(err)); |
| | 20 | }; |
| | 21 | } |
| 17 | | 22 | |
| 18 | var test_node = root_node.start(test_fn.name, null); | 23 | var test_node = root_node.start(test_fn.name, null); |
| 19 | test_node.activate(); | 24 | test_node.activate(); |
| ... | @@ -37,8 +42,6 @@ pub fn main() anyerror!void { | ... | @@ -37,8 +42,6 @@ pub fn main() anyerror!void { |
| 37 | return err; | 42 | return err; |
| 38 | }, | 43 | }, |
| 39 | } | 44 | } |
| 40 | | | |
| 41 | try std.testing.leak_count_allocator_instance.validate(); | | |
| 42 | } | 45 | } |
| 43 | root_node.end(); | 46 | root_node.end(); |
| 44 | if (ok_count == test_fn_list.len) { | 47 | if (ok_count == test_fn_list.len) { |