summaryrefslogtreecommitdiff
path: root/src/unicode_tests.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/unicode_tests.zig')
-rw-r--r--src/unicode_tests.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/unicode_tests.zig b/src/unicode_tests.zig
index 245c03f..7236ff6 100644
--- a/src/unicode_tests.zig
+++ b/src/unicode_tests.zig
@@ -19,7 +19,7 @@ comptime {
19test "Iterator.peek" { 19test "Iterator.peek" {
20 const peek_seq = "aΔ👨🏻‍🌾→"; 20 const peek_seq = "aΔ👨🏻‍🌾→";
21 const data = try GraphemeData.init(std.testing.allocator); 21 const data = try GraphemeData.init(std.testing.allocator);
22 defer data.deinit(); 22 defer data.deinit(std.testing.allocator);
23 23
24 var iter = grapheme.Iterator.init(peek_seq, &data); 24 var iter = grapheme.Iterator.init(peek_seq, &data);
25 const peek_a = iter.peek().?; 25 const peek_a = iter.peek().?;
@@ -94,7 +94,7 @@ test "Unicode normalization tests" {
94 94
95 const want = w_buf.items; 95 const want = w_buf.items;
96 var got = try n.nfc(allocator, input); 96 var got = try n.nfc(allocator, input);
97 defer got.deinit(); 97 defer got.deinit(allocator);
98 98
99 try testing.expectEqualStrings(want, got.slice); 99 try testing.expectEqualStrings(want, got.slice);
100 } else if (field_index == 2) { 100 } else if (field_index == 2) {
@@ -111,7 +111,7 @@ test "Unicode normalization tests" {
111 111
112 const want = w_buf.items; 112 const want = w_buf.items;
113 var got = try n.nfd(allocator, input); 113 var got = try n.nfd(allocator, input);
114 defer got.deinit(); 114 defer got.deinit(allocator);
115 115
116 try testing.expectEqualStrings(want, got.slice); 116 try testing.expectEqualStrings(want, got.slice);
117 } else if (field_index == 3) { 117 } else if (field_index == 3) {
@@ -128,7 +128,7 @@ test "Unicode normalization tests" {
128 128
129 const want = w_buf.items; 129 const want = w_buf.items;
130 var got = try n.nfkc(allocator, input); 130 var got = try n.nfkc(allocator, input);
131 defer got.deinit(); 131 defer got.deinit(allocator);
132 132
133 try testing.expectEqualStrings(want, got.slice); 133 try testing.expectEqualStrings(want, got.slice);
134 } else if (field_index == 4) { 134 } else if (field_index == 4) {
@@ -145,7 +145,7 @@ test "Unicode normalization tests" {
145 145
146 const want = w_buf.items; 146 const want = w_buf.items;
147 const got = try n.nfkd(allocator, input); 147 const got = try n.nfkd(allocator, input);
148 defer got.deinit(); 148 defer got.deinit(allocator);
149 149
150 try testing.expectEqualStrings(want, got.slice); 150 try testing.expectEqualStrings(want, got.slice);
151 } else { 151 } else {
@@ -163,7 +163,7 @@ test "Segmentation GraphemeIterator" {
163 var input_stream = buf_reader.reader(); 163 var input_stream = buf_reader.reader();
164 164
165 const data = try GraphemeData.init(allocator); 165 const data = try GraphemeData.init(allocator);
166 defer data.deinit(); 166 defer data.deinit(allocator);
167 167
168 var buf: [4096]u8 = undefined; 168 var buf: [4096]u8 = undefined;
169 var line_no: usize = 1; 169 var line_no: usize = 1;