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] - Fixing the output for the test diffs in PRs #2320

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions boa_tester/src/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) {
fn pretty_int(i: isize) -> String {
let mut res = String::new();

for (idx, val) in i.to_string().chars().rev().enumerate() {
for (idx, val) in i.abs().to_string().chars().rev().enumerate() {
if idx != 0 && idx % 3 == 0 {
res.insert(0, ',');
}
Expand All @@ -264,7 +264,7 @@ pub(crate) fn compare_results(base: &Path, new: &Path, markdown: bool) {
format!(
"{}{}{}{}",
if diff == 0 { "" } else { "**" },
if diff > 0 { "+" } else { "" },
if diff.is_positive() { "+" } else { "-" },
Razican marked this conversation as resolved.
Show resolved Hide resolved
pretty_int(diff),
if diff == 0 { "" } else { "**" }
)
Expand Down