zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 9ca3c897ec546bc08eefe53471c995deefc9f36d (tree)
parent f5068107cdf54f143a150feb5d500962ba98e963
Author: Sebastian Keller <sebastiankeller@fastmail.net>
Date:   Sun, 13 Feb 2022 21:58:41 +0100

test_runner.zig: Do not log test name twice

In #10859 I moved the `test_node.end()` call after everything else has
been logged. Now the `test_fn.name` is printed by `Progress` itself,
making the additional log obsolete.

Diffstat:
Mlib/std/special/test_runner.zig | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/std/special/test_runner.zig b/lib/std/special/test_runner.zig @@ -70,7 +70,7 @@ pub fn main() void { .blocking => { skip_count += 1; test_node.end(); - progress.log("{s}... SKIP (async test)\n", .{test_fn.name}); + progress.log("SKIP (async test)\n", .{}); if (!have_tty) std.debug.print("SKIP (async test)\n", .{}); continue; }, @@ -82,13 +82,13 @@ pub fn main() void { } else |err| switch (err) { error.SkipZigTest => { skip_count += 1; - progress.log("{s}... SKIP\n", .{test_fn.name}); + progress.log("SKIP\n", .{}); if (!have_tty) std.debug.print("SKIP\n", .{}); test_node.end(); }, else => { fail_count += 1; - progress.log("{s}... FAIL ({s})\n", .{ test_fn.name, @errorName(err) }); + progress.log("FAIL ({s})\n", .{@errorName(err)}); if (!have_tty) std.debug.print("FAIL ({s})\n", .{@errorName(err)}); if (@errorReturnTrace()) |trace| { std.debug.dumpStackTrace(trace.*);