Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Fix verbose test display #2731

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions boa_tester/src/edition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
/// <https://262.ecma-international.org/5.1>
ES5 = 5,
/// [ECMAScript 6th Edition](https://262.ecma-international.org/6.0)
/// ECMAScript 6th Edition
///
/// <https://262.ecma-international.org/6.0>
ES6,
/// [ECMAScript 7th Edition](https://262.ecma-international.org/7.0)
/// ECMAScript 7th Edition
///
/// <https://262.ecma-international.org/7.0>
ES7,
/// [ECMAScript 8th Edition](https://262.ecma-international.org/8.0)
/// ECMAScript 8th Edition
///
/// <https://262.ecma-international.org/8.0>
ES8,
/// [ECMAScript 9th Edition](https://262.ecma-international.org/9.0)
/// ECMAScript 9th Edition
///
/// <https://262.ecma-international.org/9.0>
ES9,
/// [ECMAScript 10th Edition](https://262.ecma-international.org/10.0)
/// ECMAScript 10th Edition
///
/// <https://262.ecma-international.org/10.0>
ES10,
/// [ECMAScript 11th Edition](https://262.ecma-international.org/11.0)
/// ECMAScript 11th Edition
///
/// <https://262.ecma-international.org/11.0>
ES11,
/// [ECMAScript 12th Edition](https://262.ecma-international.org/12.0)
/// ECMAScript 12th Edition
///
/// <https://262.ecma-international.org/12.0>
ES12,
/// [ECMAScript 13th Edition](https://262.ecma-international.org/13.0)
/// ECMAScript 13th Edition
///
/// <https://262.ecma-international.org/13.0>
ES13,
/// The edition being worked on right now.
///
/// A draft is currently available in <https://tc39.es/ecma262>.
/// A draft is currently available [here](https://tc39.es/ecma262).
#[default]
ESNext,
}
Expand Down
10 changes: 4 additions & 6 deletions boa_tester/src/exec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down
4 changes: 2 additions & 2 deletions boa_tester/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}%",
Expand Down