diff options
| author | Vexu <git@vexu.eu> | 2020-07-11 14:09:04 +0300 |
|---|---|---|
| committer | Vexu <git@vexu.eu> | 2020-07-11 20:41:19 +0300 |
| commit | e85fe13e44b1e2957b9d90e19c171fdfa8cb5505 (patch) | |
| tree | 17880994dab9c0033cc139b677711f45a87ca637 /lib/std/testing.zig | |
| parent | 8110639c7964fcb23c2b715f97ab6caa27506b93 (diff) | |
| download | zig-e85fe13e44b1e2957b9d90e19c171fdfa8cb5505.tar.gz zig-e85fe13e44b1e2957b9d90e19c171fdfa8cb5505.zip | |
run zig fmt on std lib and self hosted
Diffstat (limited to 'lib/std/testing.zig')
| -rw-r--r-- | lib/std/testing.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig index bdaf759d62..44c221d76a 100644 --- a/lib/std/testing.zig +++ b/lib/std/testing.zig @@ -19,7 +19,7 @@ pub var log_level = std.log.Level.warn; /// This function is intended to be used only in tests. It prints diagnostics to stderr /// and then aborts when actual_error_union is not expected_error. -pub fn expectError(expected_error: anyerror, actual_error_union: var) void { +pub fn expectError(expected_error: anyerror, actual_error_union: anytype) void { if (actual_error_union) |actual_payload| { std.debug.panic("expected error.{}, found {}", .{ @errorName(expected_error), actual_payload }); } else |actual_error| { @@ -36,7 +36,7 @@ pub fn expectError(expected_error: anyerror, actual_error_union: var) void { /// equal, prints diagnostics to stderr to show exactly how they are not equal, /// then aborts. /// The types must match exactly. -pub fn expectEqual(expected: var, actual: @TypeOf(expected)) void { +pub fn expectEqual(expected: anytype, actual: @TypeOf(expected)) void { switch (@typeInfo(@TypeOf(actual))) { .NoReturn, .BoundFn, |
