authorgravatar for samuel.tebbs@gmail.comSam Tebbs <samuel.tebbs@gmail.com> 2020-07-12 18:14:56+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-07-12 21:45:25+00:00
log873e187f05400a8cb515f31896ce3ca11a377ac8
treefe14fb4f9598464282c700d6aa6b971fb345e26c
parenteea7271c4e9d56e9c0fadcaac0ffef54ad786bf8

Make allocator test functions public


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/heap.zig+4-4
...@@ -815,7 +815,7 @@ test "ThreadSafeFixedBufferAllocator" {...@@ -815,7 +815,7 @@ test "ThreadSafeFixedBufferAllocator" {
815 try testAllocatorAlignedShrink(&fixed_buffer_allocator.allocator);815 try testAllocatorAlignedShrink(&fixed_buffer_allocator.allocator);
816}816}
817817
818fn testAllocator(base_allocator: *mem.Allocator) !void {818pub fn testAllocator(base_allocator: *mem.Allocator) !void {
819 var validationAllocator = mem.validationWrap(base_allocator);819 var validationAllocator = mem.validationWrap(base_allocator);
820 const allocator = &validationAllocator.allocator;820 const allocator = &validationAllocator.allocator;
821821
...@@ -846,7 +846,7 @@ fn testAllocator(base_allocator: *mem.Allocator) !void {...@@ -846,7 +846,7 @@ fn testAllocator(base_allocator: *mem.Allocator) !void {
846 allocator.free(slice);846 allocator.free(slice);
847}847}
848848
849fn testAllocatorAligned(base_allocator: *mem.Allocator, comptime alignment: u29) !void {849pub fn testAllocatorAligned(base_allocator: *mem.Allocator, comptime alignment: u29) !void {
850 var validationAllocator = mem.validationWrap(base_allocator);850 var validationAllocator = mem.validationWrap(base_allocator);
851 const allocator = &validationAllocator.allocator;851 const allocator = &validationAllocator.allocator;
852852
...@@ -873,7 +873,7 @@ fn testAllocatorAligned(base_allocator: *mem.Allocator, comptime alignment: u29)...@@ -873,7 +873,7 @@ fn testAllocatorAligned(base_allocator: *mem.Allocator, comptime alignment: u29)
873 testing.expect(slice.len == 0);873 testing.expect(slice.len == 0);
874}874}
875875
876fn testAllocatorLargeAlignment(base_allocator: *mem.Allocator) mem.Allocator.Error!void {876pub fn testAllocatorLargeAlignment(base_allocator: *mem.Allocator) mem.Allocator.Error!void {
877 var validationAllocator = mem.validationWrap(base_allocator);877 var validationAllocator = mem.validationWrap(base_allocator);
878 const allocator = &validationAllocator.allocator;878 const allocator = &validationAllocator.allocator;
879879
...@@ -905,7 +905,7 @@ fn testAllocatorLargeAlignment(base_allocator: *mem.Allocator) mem.Allocator.Err...@@ -905,7 +905,7 @@ fn testAllocatorLargeAlignment(base_allocator: *mem.Allocator) mem.Allocator.Err
905 allocator.free(slice);905 allocator.free(slice);
906}906}
907907
908fn testAllocatorAlignedShrink(base_allocator: *mem.Allocator) mem.Allocator.Error!void {908pub fn testAllocatorAlignedShrink(base_allocator: *mem.Allocator) mem.Allocator.Error!void {
909 var validationAllocator = mem.validationWrap(base_allocator);909 var validationAllocator = mem.validationWrap(base_allocator);
910 const allocator = &validationAllocator.allocator;910 const allocator = &validationAllocator.allocator;
911911