aboutsummaryrefslogtreecommitdiff
path: root/lib/std/testing.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-12-09 16:21:16 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-12-09 16:21:16 -0500
commite6c01e49d8a5104a5b71f4524ac7689ed9be9002 (patch)
treec51b2b85d4aee8eddf70e260dff6eb9615686321 /lib/std/testing.zig
parenta3f6a58c7785e7958f9d0b96d54356944bf34e32 (diff)
downloadzig-e6c01e49d8a5104a5b71f4524ac7689ed9be9002.tar.gz
zig-e6c01e49d8a5104a5b71f4524ac7689ed9be9002.zip
remove no-longer-needed workaround for var args
See #557
Diffstat (limited to 'lib/std/testing.zig')
-rw-r--r--lib/std/testing.zig10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig
index 7ffe022011..0aeb2d8eda 100644
--- a/lib/std/testing.zig
+++ b/lib/std/testing.zig
@@ -6,15 +6,7 @@ const std = @import("std.zig");
/// and then aborts when actual_error_union is not expected_error.
pub fn expectError(expected_error: anyerror, actual_error_union: var) void {
if (actual_error_union) |actual_payload| {
- // TODO remove workaround here for https://github.com/ziglang/zig/issues/557
- if (@sizeOf(@typeOf(actual_payload)) == 0) {
- std.debug.panic("expected error.{}, found {} value", .{
- @errorName(expected_error),
- @typeName(@typeOf(actual_payload)),
- });
- } else {
- std.debug.panic("expected error.{}, found {}", .{ @errorName(expected_error), actual_payload });
- }
+ std.debug.panic("expected error.{}, found {}", .{ @errorName(expected_error), actual_payload });
} else |actual_error| {
if (expected_error != actual_error) {
std.debug.panic("expected error.{}, found error.{}", .{