diff options
| author | Sam Tebbs <samuel.tebbs@gmail.com> | 2020-07-12 18:14:56 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-07-12 21:45:25 +0000 |
| commit | 873e187f05400a8cb515f31896ce3ca11a377ac8 (patch) | |
| tree | fe14fb4f9598464282c700d6aa6b971fb345e26c /lib/std | |
| parent | eea7271c4e9d56e9c0fadcaac0ffef54ad786bf8 (diff) | |
| download | zig-873e187f05400a8cb515f31896ce3ca11a377ac8.tar.gz zig-873e187f05400a8cb515f31896ce3ca11a377ac8.zip | |
Make allocator test functions public
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/heap.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/heap.zig b/lib/std/heap.zig index ba96257557..a8ab729413 100644 --- a/lib/std/heap.zig +++ b/lib/std/heap.zig @@ -815,7 +815,7 @@ test "ThreadSafeFixedBufferAllocator" { try testAllocatorAlignedShrink(&fixed_buffer_allocator.allocator); } -fn testAllocator(base_allocator: *mem.Allocator) !void { +pub fn testAllocator(base_allocator: *mem.Allocator) !void { var validationAllocator = mem.validationWrap(base_allocator); const allocator = &validationAllocator.allocator; @@ -846,7 +846,7 @@ fn testAllocator(base_allocator: *mem.Allocator) !void { allocator.free(slice); } -fn testAllocatorAligned(base_allocator: *mem.Allocator, comptime alignment: u29) !void { +pub fn testAllocatorAligned(base_allocator: *mem.Allocator, comptime alignment: u29) !void { var validationAllocator = mem.validationWrap(base_allocator); const allocator = &validationAllocator.allocator; @@ -873,7 +873,7 @@ fn testAllocatorAligned(base_allocator: *mem.Allocator, comptime alignment: u29) testing.expect(slice.len == 0); } -fn testAllocatorLargeAlignment(base_allocator: *mem.Allocator) mem.Allocator.Error!void { +pub fn testAllocatorLargeAlignment(base_allocator: *mem.Allocator) mem.Allocator.Error!void { var validationAllocator = mem.validationWrap(base_allocator); const allocator = &validationAllocator.allocator; @@ -905,7 +905,7 @@ fn testAllocatorLargeAlignment(base_allocator: *mem.Allocator) mem.Allocator.Err allocator.free(slice); } -fn testAllocatorAlignedShrink(base_allocator: *mem.Allocator) mem.Allocator.Error!void { +pub fn testAllocatorAlignedShrink(base_allocator: *mem.Allocator) mem.Allocator.Error!void { var validationAllocator = mem.validationWrap(base_allocator); const allocator = &validationAllocator.allocator; |
