aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/testing.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig
index 4b388adb67..5f2cb112bb 100644
--- a/lib/std/testing.zig
+++ b/lib/std/testing.zig
@@ -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,