From 470e896483300d099c7650f9cd8a13e236c63864 Mon Sep 17 00:00:00 2001 From: Sam Atman Date: Sun, 11 May 2025 17:26:50 -0400 Subject: Refactor in unicode_tests The comments in WordBreak and SentenceBreak tests get really long, the provided buffer would be inadequate. So this just provides a sub- iterator which will strip comments and comment lines, while keeping an eye on line numbers for any debugging. --- src/CaseFolding.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/CaseFolding.zig') diff --git a/src/CaseFolding.zig b/src/CaseFolding.zig index f63b860..ff41b3e 100644 --- a/src/CaseFolding.zig +++ b/src/CaseFolding.zig @@ -300,13 +300,13 @@ fn testAllocations(allocator: Allocator) !void { { const normalize = try Normalize.init(allocator); defer normalize.deinit(allocator); - const caser1 = try CaseFolding.initWithNormalize(allocator, normalize); - defer caser1.deinit(allocator); + const caser = try CaseFolding.initWithNormalize(allocator, normalize); + defer caser.deinit(allocator); } // With normalize owned { - const caser2 = try CaseFolding.init(allocator); - defer caser2.deinit(allocator); + const caser = try CaseFolding.init(allocator); + defer caser.deinit(allocator); } } -- cgit v1.2.3