testing: fix runtime parameters

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-03-10 13:02:36 -07:00 committed by Stephen Gutekanst
parent 35f55df696
commit afc5a50c09

View file

@ -91,7 +91,7 @@ fn ExpectVecMat(comptime T: type) type {
fn ExpectComptime(comptime T: type) type { fn ExpectComptime(comptime T: type) type {
return struct { return struct {
expected: T, expected: T,
pub fn eql(comptime e: *const @This(), comptime actual: T) !void { pub fn eql(e: *const @This(), actual: T) !void {
try testing.expectEqual(e.expected, actual); try testing.expectEqual(e.expected, actual);
} }
}; };
@ -101,11 +101,11 @@ fn ExpectBytes(comptime T: type) type {
return struct { return struct {
expected: T, expected: T,
pub fn eql(comptime e: *const @This(), comptime actual: T) !void { pub fn eql(e: *const @This(), actual: T) !void {
try testing.expectEqualStrings(e.expected, actual); try testing.expectEqualStrings(e.expected, actual);
} }
pub fn eqlBinary(comptime e: *const @This(), comptime actual: T) !void { pub fn eqlBinary(e: *const @This(), actual: T) !void {
try testing.expectEqual(e.expected, actual); try testing.expectEqual(e.expected, actual);
} }
}; };