Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing the output for the test diffs in PRs
Browse files Browse the repository at this point in the history
Razican committed Oct 2, 2022
1 parent 7f1d1a9 commit 3471f54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions boa_tester/src/results.rs
Original file line number Diff line number Diff line change
@@ -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, ',');
}
@@ -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 { "-" },
pretty_int(diff),
if diff == 0 { "" } else { "**" }
)

0 comments on commit 3471f54

Please sign in to comment.