From ed556ab094ca437700cb6c9797d2dc9639b8b8b9 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 12 Jul 2011 13:16:00 -0700 Subject: [PATCH] Improve test runner summary message. Issue #428 --- src/lib/test.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/test.rs b/src/lib/test.rs index f28eb31a175..5aa1bc16b4a 100644 --- a/src/lib/test.rs +++ b/src/lib/test.rs @@ -73,8 +73,14 @@ fn run_tests(&test_opts opts, &test_desc[] tests) -> bool { assert passed + failed == total; - out.write_str(#fmt("\nresults: %u passed; %u failed\n\n", - passed, failed)); + out.write_str(#fmt("\nresult: ")); + if (failed == 0u) { + write_ok(out); + } else { + write_failed(out); + } + out.write_str(#fmt(". %u passed; %u failed\n\n", + passed, failed)); ret true;