summaryrefslogtreecommitdiff
path: root/src/CaseFolding.zig
diff options
context:
space:
mode:
authorGravatar Sam Atman2025-04-30 20:30:39 -0400
committerGravatar Sam Atman2025-04-30 20:30:39 -0400
commit10048b0d31d0db923ae39c6bbd67139ed6252f6f (patch)
tree65df1666aacd102f59b4ac0844ccc7f7ddda91db /src/CaseFolding.zig
parentSetup variants for all allocating modules (diff)
downloadzg-10048b0d31d0db923ae39c6bbd67139ed6252f6f.tar.gz
zg-10048b0d31d0db923ae39c6bbd67139ed6252f6f.tar.xz
zg-10048b0d31d0db923ae39c6bbd67139ed6252f6f.zip
Allocation Failure Tests
These turned up an excessive amount of allocations in CanonData and CompatData, which have been reduced to two through the somewhat squirrely use of 'magic numbers'. There are now allocation tests for every allocated structure in the library, and they run to completion in a reasonable amount of time. So, that's nice.
Diffstat (limited to 'src/CaseFolding.zig')
-rw-r--r--src/CaseFolding.zig15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/CaseFolding.zig b/src/CaseFolding.zig
index 2e53bfa..f63b860 100644
--- a/src/CaseFolding.zig
+++ b/src/CaseFolding.zig
@@ -310,14 +310,13 @@ fn testAllocations(allocator: Allocator) !void {
310 } 310 }
311} 311}
312 312
313// test "Allocation Failures" { 313test "Allocation Failures" {
314// if (true) return error.SkipZigTest; // XXX: remove 314 try testing.checkAllAllocationFailures(
315// try testing.checkAllAllocationFailures( 315 testing.allocator,
316// testing.allocator, 316 testAllocations,
317// testAllocations, 317 .{},
318// .{}, 318 );
319// ); 319}
320// }
321 320
322const std = @import("std"); 321const std = @import("std");
323const builtin = @import("builtin"); 322const builtin = @import("builtin");