aboutsummaryrefslogtreecommitdiff
path: root/lib/std/testing.zig
diff options
context:
space:
mode:
authorVexu <git@vexu.eu>2020-07-11 14:09:04 +0300
committerVexu <git@vexu.eu>2020-07-11 20:41:19 +0300
commite85fe13e44b1e2957b9d90e19c171fdfa8cb5505 (patch)
tree17880994dab9c0033cc139b677711f45a87ca637 /lib/std/testing.zig
parent8110639c7964fcb23c2b715f97ab6caa27506b93 (diff)
downloadzig-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.zig4
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,