From 1c457b2bbbd67929e73008c76fe4bc697c95b1ae Mon Sep 17 00:00:00 2001 From: Halid Odat Date: Wed, 25 Aug 2021 09:48:32 +0200 Subject: [PATCH] Show count of tests failed/broken on header (#1512) --- boa_tester/src/results.rs | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/boa_tester/src/results.rs b/boa_tester/src/results.rs index 7aa65f7dc5..d42cfd29c1 100644 --- a/boa_tester/src/results.rs +++ b/boa_tester/src/results.rs @@ -274,7 +274,10 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) { if !test_diff.fixed.is_empty() { println!(); - println!("
Fixed tests:"); + println!( + "
Fixed tests ({}):", + test_diff.fixed.len() + ); println!("\n```"); for test in test_diff.fixed { println!("{}", test); @@ -285,7 +288,10 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) { if !test_diff.broken.is_empty() { println!(); - println!("
Broken tests:"); + println!( + "
Broken tests ({}):", + test_diff.broken.len() + ); println!("\n```"); for test in test_diff.broken { println!("{}", test); @@ -296,7 +302,10 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) { if !test_diff.new_panics.is_empty() { println!(); - println!("
New panics:"); + println!( + "
New panics ({}):", + test_diff.new_panics.len() + ); println!("\n```"); for test in test_diff.new_panics { println!("{}", test); @@ -307,7 +316,10 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) { if !test_diff.panic_fixes.is_empty() { println!(); - println!("
Fixed panics:"); + println!( + "
Fixed panics ({}):", + test_diff.panic_fixes.len() + ); println!("\n```"); for test in test_diff.panic_fixes { println!("{}", test); @@ -345,7 +357,7 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) { if !test_diff.fixed.is_empty() { println!(); - println!("Fixed tests:"); + println!("Fixed tests ({}):", test_diff.fixed.len()); for test in test_diff.fixed { println!("{}", test); } @@ -353,7 +365,7 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) { if !test_diff.broken.is_empty() { println!(); - println!("Broken tests:"); + println!("Broken tests ({}):", test_diff.broken.len()); for test in test_diff.broken { println!("{}", test); } @@ -361,7 +373,7 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) { if !test_diff.new_panics.is_empty() { println!(); - println!("New panics:"); + println!("New panics ({}):", test_diff.new_panics.len()); for test in test_diff.new_panics { println!("{}", test); } @@ -369,7 +381,7 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) { if !test_diff.panic_fixes.is_empty() { println!(); - println!("Fixed panics:"); + println!("Fixed panics ({}):", test_diff.panic_fixes.len()); for test in test_diff.panic_fixes { println!("{}", test); }