From a110208443d5539b2d180a70614f336ec5cec220 Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Thu, 23 Mar 2023 13:05:55 -0600 Subject: [PATCH 1/3] Fix verbose test display --- boa_tester/src/exec/mod.rs | 10 ++++------ boa_tester/src/main.rs | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/boa_tester/src/exec/mod.rs b/boa_tester/src/exec/mod.rs index 756a2d77fbd..7974f0409e4 100644 --- a/boa_tester/src/exec/mod.rs +++ b/boa_tester/src/exec/mod.rs @@ -105,21 +105,19 @@ impl TestSuite { if verbose != 0 { println!( - "Suite {} results: total: {}, passed: {}, ignored: {}, failed: {} (panics: \ - {}{}), conformance: {:.2}%", - es_next.total, + "Suite {} results: total: {}, passed: {}, ignored: {}, failed: {} {}, conformance: {:.2}%", self.path.display(), + es_next.total, es_next.passed.to_string().green(), es_next.ignored.to_string().yellow(), (es_next.total - es_next.passed - es_next.ignored) .to_string() .red(), if es_next.panic == 0 { - "0".normal() + String::new() } else { - es_next.panic.to_string().red() + format!("({})", format!("{} panics", es_next.panic).red()) }, - if es_next.panic == 0 { "" } else { " ⚠" }.red(), (es_next.passed as f64 / es_next.total as f64) * 100.0 ); } diff --git a/boa_tester/src/main.rs b/boa_tester/src/main.rs index 94986dc36b7..d8421d5d38f 100644 --- a/boa_tester/src/main.rs +++ b/boa_tester/src/main.rs @@ -343,9 +343,9 @@ fn run_test_suite( println!("Passed tests: {}", passed.to_string().green()); println!("Ignored tests: {}", ignored.to_string().yellow()); println!( - "Failed tests: {} (panics: {})", + "Failed tests: {} ({})", (total - passed - ignored).to_string().red(), - panic.to_string().red() + format!("{panic} panics").red() ); println!( "Conformance: {:.2}%", From 583d63cff9376f4bb1ae5037c1458a654caf1864 Mon Sep 17 00:00:00 2001 From: jedel1043 Date: Thu, 23 Mar 2023 13:59:40 -0600 Subject: [PATCH 2/3] Fix help message --- boa_tester/src/edition.rs | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/boa_tester/src/edition.rs b/boa_tester/src/edition.rs index 92f7527cbfb..466c215a261 100644 --- a/boa_tester/src/edition.rs +++ b/boa_tester/src/edition.rs @@ -276,27 +276,45 @@ static FEATURE_EDITION: phf::Map<&'static str, SpecEdition> = phf::phf_map! { )] #[serde(untagged)] pub(crate) enum SpecEdition { - /// [ECMAScript 5.1 Edition](https://262.ecma-international.org/5.1) + /// ECMAScript 5.1 Edition + /// + /// ES5 = 5, - /// [ECMAScript 6th Edition](https://262.ecma-international.org/6.0) + /// ECMAScript 6th Edition + /// + /// ES6, - /// [ECMAScript 7th Edition](https://262.ecma-international.org/7.0) + /// ECMAScript 7th Edition + /// + /// ES7, - /// [ECMAScript 8th Edition](https://262.ecma-international.org/8.0) + /// ECMAScript 8th Edition + /// + /// ES8, - /// [ECMAScript 9th Edition](https://262.ecma-international.org/9.0) + /// ECMAScript 9th Edition + /// + /// ES9, - /// [ECMAScript 10th Edition](https://262.ecma-international.org/10.0) + /// ECMAScript 10th Edition + /// + /// ES10, - /// [ECMAScript 11th Edition](https://262.ecma-international.org/11.0) + /// ECMAScript 11th Edition + /// + /// ES11, - /// [ECMAScript 12th Edition](https://262.ecma-international.org/12.0) + /// ECMAScript 12th Edition + /// + /// ES12, - /// [ECMAScript 13th Edition](https://262.ecma-international.org/13.0) + /// ECMAScript 13th Edition + /// + /// ES13, /// The edition being worked on right now. /// - /// A draft is currently available in . + /// A draft is currently available at . #[default] ESNext, } From 16143f75aa72ba2e2e68529b3fec370fd18005c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Juli=C3=A1n=20Espina?= Date: Thu, 23 Mar 2023 20:29:47 +0000 Subject: [PATCH 3/3] Reword doc comment --- boa_tester/src/edition.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boa_tester/src/edition.rs b/boa_tester/src/edition.rs index 466c215a261..a9ea5327081 100644 --- a/boa_tester/src/edition.rs +++ b/boa_tester/src/edition.rs @@ -314,7 +314,7 @@ pub(crate) enum SpecEdition { ES13, /// The edition being worked on right now. /// - /// A draft is currently available at . + /// A draft is currently available [here](https://tc39.es/ecma262). #[default] ESNext, }