From 10048b0d31d0db923ae39c6bbd67139ed6252f6f Mon Sep 17 00:00:00 2001 From: Sam Atman Date: Wed, 30 Apr 2025 20:30:39 -0400 Subject: 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. --- src/Normalize.zig | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/Normalize.zig') diff --git a/src/Normalize.zig b/src/Normalize.zig index 1500b4c..989ec29 100644 --- a/src/Normalize.zig +++ b/src/Normalize.zig @@ -657,21 +657,6 @@ test "isLatin1Only" { try testing.expect(!isLatin1Only(not_latin1_only)); } -// NOTE: These tests take way waaaaay too long to run, because -// the amount of allocations in a couple of the inflators is -// completely excessive and is also costing memory for metadata. -// I'm leaving this here for when I fix that. -// -// fn testAllocations(allocator: Allocator) !void { -// const norm = try Normalize.init(allocator); -// norm.deinit(allocator); -// } -// -// test "allocation failures" { -// if (true) return error.SkipZigTest; -// try testing.checkAllAllocationFailures(testing.allocator, testAllocations, .{}); -// } - const std = @import("std"); const debug = std.debug; const assert = debug.assert; -- cgit v1.2.3