close some gaps in the type system
This commit is contained in:
@@ -7,6 +7,7 @@ handles_append test {
|
||||
|
||||
try append(&list, 42)
|
||||
|
||||
try testing.expect_type(usize, list.items.len)
|
||||
try testing.expect_equal(1, list.items.len)
|
||||
try testing.expect_equal(42, list.items[0])
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ expect_equal func($T type, expected, actual T, location SourceLocation) void ! E
|
||||
}
|
||||
}
|
||||
|
||||
expect_type func($Expected, $Actual type, _ Actual, location SourceLocation) void ! Error {
|
||||
try expect($(Expected == Actual), location)
|
||||
}
|
||||
|
||||
run func(name []u8, callback *func() void ! Error) bool {
|
||||
callback() catch |_| {
|
||||
debug.print("{s} [failed]\n", {name,})
|
||||
|
||||
Reference in New Issue
Block a user