std: Better handling of type values in expectEqual

master
LemonBoy 2020-10-29 11:10:21 +01:00 committed by Veikka Tuominen
parent 81f5e1e667
commit fe6cc0c3ba
1 changed files with 6 additions and 1 deletions

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,