std: Better handling of type values in expectEqual

This commit is contained in:
LemonBoy 2020-10-29 11:10:21 +01:00
parent 7bc9531698
commit 88eb3ae8e5

View File

@ -53,7 +53,12 @@ pub fn expectEqual(expected: anytype, actual: @TypeOf(expected)) void {
.Void,
=> return,
.Type,
.Type => {
if (actual != expected) {
std.debug.panic("expected type {}, found type {}", .{ @typeName(expected), @typeName(actual) });
}
},
.Bool,
.Int,
.Float,