From 95f9487f6a7bde2d7266399bdf6843b97cc1b301 Mon Sep 17 00:00:00 2001 From: Sam Atman Date: Thu, 5 Feb 2026 07:07:40 -0500 Subject: Base units do not allocate CanonData included. I may still sort out caseless matching without allocation, but that's a stretch goal. Closes #86 Closes #85 --- src/unicode_tests.zig | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/unicode_tests.zig') diff --git a/src/unicode_tests.zig b/src/unicode_tests.zig index 50b8824..81ea90d 100644 --- a/src/unicode_tests.zig +++ b/src/unicode_tests.zig @@ -5,9 +5,6 @@ test "Unicode normalization tests" { defer arena.deinit(); const allocator = arena.allocator(); - const n = try Normalize.init(allocator); - defer n.deinit(allocator); - var reader = std.io.Reader.fixed(@embedFile("NormalizationTest.txt")); var cp_buf: [4]u8 = undefined; @@ -47,7 +44,7 @@ test "Unicode normalization tests" { } const want = w_buf.items; - var got = try n.nfc(allocator, input); + var got = try Normalize.nfc(allocator, input); defer got.deinit(allocator); try testing.expectEqualStrings(want, got.slice); @@ -64,7 +61,7 @@ test "Unicode normalization tests" { } const want = w_buf.items; - var got = try n.nfd(allocator, input); + var got = try Normalize.nfd(allocator, input); defer got.deinit(allocator); try testing.expectEqualStrings(want, got.slice); @@ -81,7 +78,7 @@ test "Unicode normalization tests" { } const want = w_buf.items; - var got = try n.nfkc(allocator, input); + var got = try Normalize.nfkc(allocator, input); defer got.deinit(allocator); try testing.expectEqualStrings(want, got.slice); @@ -98,7 +95,7 @@ test "Unicode normalization tests" { } const want = w_buf.items; - const got = try n.nfkd(allocator, input); + const got = try Normalize.nfkd(allocator, input); defer got.deinit(allocator); try testing.expectEqualStrings(want, got.slice); -- cgit v1.2.3