summaryrefslogtreecommitdiff
path: root/test.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test.zig')
-rw-r--r--test.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/test.zig b/test.zig
index c42fbb9..70bbab1 100644
--- a/test.zig
+++ b/test.zig
@@ -9,12 +9,12 @@ const assert = debug.assert;
9const ArgSliceIterator = clap.ArgSliceIterator; 9const ArgSliceIterator = clap.ArgSliceIterator;
10const Names = clap.Names; 10const Names = clap.Names;
11const Param = clap.Param(u8); 11const Param = clap.Param(u8);
12const Clap = clap.Clap(u8, ArgSliceIterator.Error); 12const StreamingClap = clap.StreamingClap(u8, ArgSliceIterator.Error);
13const Arg = clap.Arg(u8); 13const Arg = clap.Arg(u8);
14 14
15fn testNoErr(params: []const Param, args: []const []const u8, results: []const Arg) void { 15fn testNoErr(params: []const Param, args: []const []const u8, results: []const Arg) void {
16 var arg_iter = ArgSliceIterator.init(args); 16 var arg_iter = ArgSliceIterator.init(args);
17 var c = Clap.init(params, &arg_iter.iter); 17 var c = StreamingClap.init(params, &arg_iter.iter);
18 18
19 for (results) |res| { 19 for (results) |res| {
20 const arg = (c.next() catch unreachable) orelse unreachable; 20 const arg = (c.next() catch unreachable) orelse unreachable;
@@ -224,7 +224,7 @@ test "clap.Example" {
224 // a slice of arguments. For real program, you would probably 224 // a slice of arguments. For real program, you would probably
225 // use `OsArgIterator`. 225 // use `OsArgIterator`.
226 var iter = &c.ArgSliceIterator.init(program_args).iter; 226 var iter = &c.ArgSliceIterator.init(program_args).iter;
227 var parser = c.Clap(u8, c.ArgSliceIterator.Error).init(params, iter); 227 var parser = c.StreamingClap(u8, c.ArgSliceIterator.Error).init(params, iter);
228 228
229 // Iterate over all arguments passed to the program. 229 // Iterate over all arguments passed to the program.
230 // In real code, you should probably handle the errors 230 // In real code, you should probably handle the errors