diff options
Diffstat (limited to 'src/streaming.zig')
| -rw-r--r-- | src/streaming.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/streaming.zig b/src/streaming.zig index babc573..7bdc71f 100644 --- a/src/streaming.zig +++ b/src/streaming.zig | |||
| @@ -3,7 +3,7 @@ const clap = @import("index.zig"); | |||
| 3 | const std = @import("std"); | 3 | const std = @import("std"); |
| 4 | 4 | ||
| 5 | const args = clap.args; | 5 | const args = clap.args; |
| 6 | const debug = std.debug; | 6 | const testing = std.testing; |
| 7 | const heap = std.heap; | 7 | const heap = std.heap; |
| 8 | const mem = std.mem; | 8 | const mem = std.mem; |
| 9 | const os = std.os; | 9 | const os = std.os; |
| @@ -194,17 +194,17 @@ fn testNoErr(params: []const clap.Param(u8), args_strings: []const []const u8, r | |||
| 194 | 194 | ||
| 195 | for (results) |res| { | 195 | for (results) |res| { |
| 196 | const arg = (c.next() catch unreachable) orelse unreachable; | 196 | const arg = (c.next() catch unreachable) orelse unreachable; |
| 197 | debug.assert(res.param == arg.param); | 197 | testing.expectEqual(res.param, arg.param); |
| 198 | const expected_value = res.value orelse { | 198 | const expected_value = res.value orelse { |
| 199 | debug.assert(arg.value == null); | 199 | testing.expectEqual(@typeOf(arg.value)(null), arg.value); |
| 200 | continue; | 200 | continue; |
| 201 | }; | 201 | }; |
| 202 | const actual_value = arg.value orelse unreachable; | 202 | const actual_value = arg.value orelse unreachable; |
| 203 | debug.assert(mem.eql(u8, expected_value, actual_value)); | 203 | testing.expectEqualSlices(u8, expected_value, actual_value); |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | if (c.next() catch unreachable) |_| { | 206 | if (c.next() catch @panic("")) |_| { |
| 207 | unreachable; | 207 | @panic(""); |
| 208 | } | 208 | } |
| 209 | } | 209 | } |
| 210 | 210 | ||