also looking at this
Port to latest zig-master
#2
53 files
+1149
-1017
| @@ -28,7 +28,7 @@ test "concurrent matching with same regex" { | ||
| 28 | 28 | const allocator = testing.allocator; |
| 29 | 29 | |
| 30 | 30 | // Compile a regex once |
| 31 | var regex = try Regex.compile(allocator, "\\d+"); | |
| 31 | var regex = try Regex.compile(allocator, std.testing.io, "\\d+"); | |
| 32 | 32 | defer regex.deinit(); |
| 33 | 33 | |
| 34 | 34 | // Test inputs |
| @@ -73,7 +73,7 @@ test "concurrent matching with same regex" { | ||
| 73 | 73 | test "concurrent find operations" { |
| 74 | 74 | const allocator = testing.allocator; |
| 75 | 75 | |
| 76 | var regex = try Regex.compile(allocator, "[0-9]+"); | |
| 76 | var regex = try Regex.compile(allocator, std.testing.io, "[0-9]+"); | |
| 77 | 77 | defer regex.deinit(); |
| 78 | 78 | |
| 79 | 79 | const Worker = struct { |
| @@ -114,7 +114,7 @@ test "concurrent find operations" { | ||
| 114 | 114 | test "SharedRegex reference counting" { |
| 115 | 115 | const allocator = testing.allocator; |
| 116 | 116 | |
| 117 | var shared = try SharedRegex.init(allocator, "test"); | |
| 117 | var shared = try SharedRegex.init(allocator, testing.io, "test"); | |
| 118 | 118 | defer shared.deinit(); |
| 119 | 119 | |
| 120 | 120 | // Acquire multiple references |
| @@ -137,7 +137,7 @@ test "SharedRegex reference counting" { | ||
| 137 | 137 | test "SharedRegex concurrent access" { |
| 138 | 138 | const allocator = testing.allocator; |
| 139 | 139 | |
| 140 | var shared = try SharedRegex.init(allocator, "\\d+"); | |
| 140 | var shared = try SharedRegex.init(allocator, testing.io, "\\d+"); | |
| 141 | 141 | defer shared.deinit(); |
| 142 | 142 | |
| 143 | 143 | const Worker = struct { |
| @@ -172,7 +172,7 @@ test "SharedRegex concurrent access" { | ||
| 172 | 172 | test "RegexCache basic operations" { |
| 173 | 173 | const allocator = testing.allocator; |
| 174 | 174 | |
| 175 | var cache = RegexCache.init(allocator); | |
| 175 | var cache = RegexCache.init(allocator, testing.io); | |
| 176 | 176 | defer cache.deinit(); |
| 177 | 177 | |
| 178 | 178 | // Get and cache a pattern |
| @@ -195,7 +195,7 @@ test "thread-safe allocator with concurrent matching" { | ||
| 195 | 195 | defer _ = gpa.deinit(); |
| 196 | 196 | const allocator = gpa.allocator(); |
| 197 | 197 | |
| 198 | var regex = try Regex.compile(allocator, "test"); | |
| 198 | var regex = try Regex.compile(allocator, std.testing.io, "test"); | |
| 199 | 199 | defer regex.deinit(); |
| 200 | 200 | |
| 201 | 201 | const Worker = struct { |
| @@ -227,13 +227,13 @@ test "concurrent matching different patterns" { | ||
| 227 | 227 | const allocator = gpa.allocator(); |
| 228 | 228 | |
| 229 | 229 | // Compile multiple patterns |
| 230 | var regex1 = try Regex.compile(allocator, "\\d+"); | |
| 230 | var regex1 = try Regex.compile(allocator, std.testing.io, "\\d+"); | |
| 231 | 231 | defer regex1.deinit(); |
| 232 | 232 | |
| 233 | var regex2 = try Regex.compile(allocator, "[a-z]+"); | |
| 233 | var regex2 = try Regex.compile(allocator, std.testing.io, "[a-z]+"); | |
| 234 | 234 | defer regex2.deinit(); |
| 235 | 235 | |
| 236 | var regex3 = try Regex.compile(allocator, "test"); | |
| 236 | var regex3 = try Regex.compile(allocator, std.testing.io, "test"); | |
| 237 | 237 | defer regex3.deinit(); |
| 238 | 238 | |
| 239 | 239 | const Worker = struct { |
| @@ -276,7 +276,7 @@ test "stress test: many threads many matches" { | ||
| 276 | 276 | defer _ = gpa.deinit(); |
| 277 | 277 | const allocator = gpa.allocator(); |
| 278 | 278 | |
| 279 | var regex = try Regex.compile(allocator, "test"); | |
| 279 | var regex = try Regex.compile(allocator, std.testing.io, "test"); | |
| 280 | 280 | defer regex.deinit(); |
| 281 | 281 | |
| 282 | 282 | const Worker = struct { |