diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-09 00:52:52 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-09 01:28:28 -0300 |
| commit | 5157579ff7f9ae0cfc3c7629e953da05bce340fc (patch) | |
| tree | 02147789efdcea998981efcfe05d4bcb3e9bb7b0 /src/c_heap.zig | |
| parent | 4c4b9bf54d77dbc0f9f4e2619746908e501c6001 (diff) | |
| download | pardes-5157579ff7f9ae0cfc3c7629e953da05bce340fc.tar.gz pardes-5157579ff7f9ae0cfc3c7629e953da05bce340fc.zip | |
tests: at the end of their files: every top-level test block of the 46 files that had one mid-file (the locality analysis's 45 and test/hxdiff.zig; gui.zig, macos.zig, look, host_io, 9p_io, terminal, tui, mouse, fs, replica, layout among them, 11,429 test lines), with the functions only tests call, moved after the file's code in their order, a mechanical move (.scratch/suites/tests_to_end.py), zig fmt'd; the unit suites pass as before (tui 1486/1487, gui 1536/1537, core 956/956 on both), macos.zig only parse-checked here
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/c_heap.zig')
| -rw-r--r-- | src/c_heap.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/c_heap.zig b/src/c_heap.zig index efd2064d..51cfc137 100644 --- a/src/c_heap.zig +++ b/src/c_heap.zig @@ -103,6 +103,11 @@ pub fn Heap(comptime current: *const std.mem.Allocator) type { var test_allocator: std.mem.Allocator = undefined; +/// Never written, as a release session's zstd heap's allocator was: a +/// constant to the compiler, `ptr` (undefined in std's stateless +/// allocators) whatever it likes at each comparison. +var stateless: std.mem.Allocator = std.heap.page_allocator; + test "a C heap block keeps its bytes, frees exactly, and goes back where it came from" { const heap = Heap(&test_allocator); test_allocator = std.testing.allocator; @@ -141,11 +146,6 @@ test "a C heap block keeps its bytes, frees exactly, and goes back where it came heap.free(null); } -/// Never written, as a release session's zstd heap's allocator was: a -/// constant to the compiler, `ptr` (undefined in std's stateless -/// allocators) whatever it likes at each comparison. -var stateless: std.mem.Allocator = std.heap.page_allocator; - test "a heap over a stateless allocator that is never repointed names it once" { const heap = Heap(&stateless); const before = allocators_len.load(.monotonic); |
