summaryrefslogtreecommitdiff
path: root/src/Normalize.zig
diff options
context:
space:
mode:
authorGravatar Sam Atman2025-04-30 15:23:14 -0400
committerGravatar Sam Atman2025-04-30 15:23:14 -0400
commit312ca415bb01212a320acacda743896ed59a7b82 (patch)
tree8568a7af7084e5df6805388afc4f4008b8205c6c /src/Normalize.zig
parentMerge NormData with Normalize (diff)
downloadzg-312ca415bb01212a320acacda743896ed59a7b82.tar.gz
zg-312ca415bb01212a320acacda743896ed59a7b82.tar.xz
zg-312ca415bb01212a320acacda743896ed59a7b82.zip
Remove FoldData, make CaseFolding
CaseFolding now has the FoldData, and can be initialized with a copy of Normalize if wanted.
Diffstat (limited to 'src/Normalize.zig')
-rw-r--r--src/Normalize.zig16
1 files changed, 15 insertions, 1 deletions
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" {
632 try testing.expect(!isLatin1Only(not_latin1_only)); 632 try testing.expect(!isLatin1Only(not_latin1_only));
633} 633}
634 634
635// NOTE: These tests take way waaaaay too long to run, because
636// the amount of allocations in a couple of the inflators is
637// completely excessive and is also costing memory for metadata.
638// I'm leaving this here for when I fix that.
639//
640// fn testAllocations(allocator: Allocator) !void {
641// const norm = try Normalize.init(allocator);
642// norm.deinit(allocator);
643// }
644//
645// test "allocation failures" {
646// if (true) return error.SkipZigTest;
647// try testing.checkAllAllocationFailures(testing.allocator, testAllocations, .{});
648// }
649
635const std = @import("std"); 650const std = @import("std");
636const debug = std.debug; 651const debug = std.debug;
637const assert = debug.assert; 652const assert = debug.assert;
@@ -649,6 +664,5 @@ const CodePointIterator = @import("code_point").Iterator;
649const CanonData = @import("CanonData"); 664const CanonData = @import("CanonData");
650const CccData = @import("CombiningData"); 665const CccData = @import("CombiningData");
651const CompatData = @import("CompatData"); 666const CompatData = @import("CompatData");
652const FoldData = @import("FoldData");
653const HangulData = @import("HangulData"); 667const HangulData = @import("HangulData");
654const NormPropsData = @import("NormPropsData"); 668const NormPropsData = @import("NormPropsData");