From 312ca415bb01212a320acacda743896ed59a7b82 Mon Sep 17 00:00:00 2001 From: Sam Atman Date: Wed, 30 Apr 2025 15:23:14 -0400 Subject: Remove FoldData, make CaseFolding CaseFolding now has the FoldData, and can be initialized with a copy of Normalize if wanted. --- src/Normalize.zig | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/Normalize.zig') diff --git a/src/Normalize.zig b/src/Normalize.zig index 4f014cf..d8c867d 100644 --- a/src/Normalize.zig +++ b/src/Normalize.zig @@ -632,6 +632,21 @@ 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; @@ -649,6 +664,5 @@ const CodePointIterator = @import("code_point").Iterator; const CanonData = @import("CanonData"); const CccData = @import("CombiningData"); const CompatData = @import("CompatData"); -const FoldData = @import("FoldData"); const HangulData = @import("HangulData"); const NormPropsData = @import("NormPropsData"); -- cgit v1.2.3