authorgravatar for rb.lymn@gmail.comRobbie Lyman <rb.lymn@gmail.com> 2026-08-06 23:44:45-04:00
committergravatar for rb.lymn@gmail.comRobbie Lyman <rb.lymn@gmail.com> 2026-08-06 23:46:49-04:00
log16fbd314dc9590077267fc373b76b7c7b977977a
treefa3cb969251cb284e8b08b44011af632d7c40f83
parent89069b54d9f3a83ac675c6a18df2c4a52d019835

fix(Allocator): test style fixes


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

lib/std/mem/Allocator.zig+13-13
...@@ -602,32 +602,32 @@ test failing {...@@ -602,32 +602,32 @@ test failing {
602test "free single-pointer to array" {602test "free single-pointer to array" {
603 const allocator = std.testing.allocator;603 const allocator = std.testing.allocator;
604 {604 {
605 const slice = allocator.alloc(u32, 128) catch return error.SkipZigTest;605 const allocation = try allocator.alloc(u32, 128);
606 slice[127] = 0;606 allocation[127] = 0;
607 const ptr = slice[0..127 :0];607 const ptr: *[127:0]u32 = allocation[0..127 :0];
608 allocator.free(ptr);608 allocator.free(ptr);
609 }609 }
610 {610 {
611 const slice = allocator.alloc(u32, 128) catch return error.SkipZigTest;611 const allocation = try allocator.alloc(u32, 128);
612 slice[127] = 0;612 allocation[127] = 0;
613 const ptr = slice[0..127 :0];613 const ptr: *[127:0]u32 = allocation[0..127 :0];
614 if (allocator.resize(ptr, 16)) {614 if (allocator.resize(ptr, 16)) {
615 allocator.free(ptr[0..16]);615 allocator.free(ptr[0..16]);
616 } else allocator.free(ptr);616 } else allocator.free(ptr);
617 }617 }
618 {618 {
619 const slice = allocator.alloc(u32, 128) catch return error.SkipZigTest;619 const allocation = try allocator.alloc(u32, 128);
620 slice[127] = 0;620 allocation[127] = 0;
621 const ptr = slice[0..127 :0];621 const ptr: *[127:0]u32 = allocation[0..127 :0];
622 if (allocator.remap(ptr, 16)) |new| {622 if (allocator.remap(ptr, 16)) |new| {
623 allocator.free(new);623 allocator.free(new);
624 } else allocator.free(ptr);624 } else allocator.free(ptr);
625 }625 }
626 {626 {
627 const slice = allocator.alloc(u32, 128) catch return error.SkipZigTest;627 const allocation = try allocator.alloc(u32, 128);
628 slice[127] = 0;628 allocation[127] = 0;
629 const ptr = slice[0..127 :0];629 const ptr: *[127:0]u32 = allocation[0..127 :0];
630 const new = allocator.realloc(ptr, 16) catch return error.SkipZigTest;630 const new = try allocator.realloc(ptr, 16);
631 allocator.free(new);631 allocator.free(new);
632 }632 }
633}633}