summaryrefslogtreecommitdiff
path: root/src/comptime.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/comptime.zig')
-rw-r--r--src/comptime.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/comptime.zig b/src/comptime.zig
index 0a4257e..b9021de 100644
--- a/src/comptime.zig
+++ b/src/comptime.zig
@@ -1,7 +1,7 @@
1const clap = @import("index.zig"); 1const clap = @import("index.zig");
2const std = @import("std"); 2const std = @import("std");
3 3
4const debug = std.debug; 4const testing = std.testing;
5const heap = std.heap; 5const heap = std.heap;
6const mem = std.mem; 6const mem = std.mem;
7 7
@@ -130,12 +130,12 @@ test "clap.comptime.ComptimeClap" {
130 var args = try Clap.parse(&fb_allocator.allocator, clap.args.SliceIterator, &iter); 130 var args = try Clap.parse(&fb_allocator.allocator, clap.args.SliceIterator, &iter);
131 defer args.deinit(); 131 defer args.deinit();
132 132
133 debug.assert(args.flag("-a")); 133 testing.expect(args.flag("-a"));
134 debug.assert(args.flag("--aa")); 134 testing.expect(args.flag("--aa"));
135 debug.assert(!args.flag("-b")); 135 testing.expect(!args.flag("-b"));
136 debug.assert(!args.flag("--bb")); 136 testing.expect(!args.flag("--bb"));
137 debug.assert(mem.eql(u8, args.option("-c").?, "0")); 137 testing.expectEqualSlices(u8, "0", args.option("-c").?);
138 debug.assert(mem.eql(u8, args.option("--cc").?, "0")); 138 testing.expectEqualSlices(u8, "0", args.option("--cc").?);
139 debug.assert(args.positionals().len == 1); 139 testing.expectEqual(usize(1), args.positionals().len);
140 debug.assert(mem.eql(u8, args.positionals()[0], "something")); 140 testing.expectEqualSlices(u8, "something", args.positionals()[0]);
141} 141}