Skip to content

Commit

Permalink
Also print a diff
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Feb 20, 2024
1 parent b39041d commit f47f805
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fidget/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ mod test {
if img_str != expected {
println!("image mismatch detected!");
println!("Expected:\n{expected}\nGot:\n{img_str}");
println!("Diff:");
for (a, b) in img_str.chars().zip(expected.chars()) {
print!("{}", if a != b { '!' } else { a });
}
panic!("image mismatch");
}
}
Expand Down

0 comments on commit f47f805

Please sign in to comment.