| ... | ... | @@ -24,11 +24,7 @@ pub fn expectError(expected_error: anyerror, actual_error_union: var) void { |
| 24 | 24 | /// equal, prints diagnostics to stderr to show exactly how they are not equal, |
| 25 | 25 | /// then aborts. |
| 26 | 26 | /// The types must match exactly. |
| 27 | | pub fn expectEqual(expected: var, actual: var) void { |
| 28 | | if (@typeOf(actual) != @typeOf(expected)) { |
| 29 | | @compileError("type mismatch. expected " ++ @typeName(@typeOf(expected)) ++ ", found " ++ @typeName(@typeOf(actual))); |
| 30 | | } |
| 31 | | |
| 27 | pub fn expectEqual(expected: var, actual: @typeOf(expected)) void { |
| 32 | 28 | switch (@typeInfo(@typeOf(actual))) { |
| 33 | 29 | TypeId.NoReturn, |
| 34 | 30 | TypeId.BoundFn, |