authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-10-29 11:10:21+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-10-29 11:10:21+01:00
log88eb3ae8e5ff5aa53ff197ca3e008502b043936f
tree2f8ff4772bd3857b7a0ed4a12c1e903000a424c5
parent7bc95316982da0da6fd5d935645972fe5464e46e

std: Better handling of type values in expectEqual


1 files changed, 6 insertions(+), 1 deletions(-)

lib/std/testing.zig+6-1
......@@ -53,7 +53,12 @@ pub fn expectEqual(expected: anytype, actual: @TypeOf(expected)) void {
5353 .Void,
5454 => return,
5555
56 .Type,
56 .Type => {
57 if (actual != expected) {
58 std.debug.panic("expected type {}, found type {}", .{ @typeName(expected), @typeName(actual) });
59 }
60 },
61
5762 .Bool,
5863 .Int,
5964 .Float,