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