mirror of
https://github.com/lise-henry/crowbook
synced 2024-09-28 02:59:45 +02:00
Use debug printing instead of single printing when a test errors
This commit is contained in:
parent
2b37374a8f
commit
81bee70877
@ -1,7 +1,7 @@
|
|||||||
/// Equivalent to assert_eq! but with prettier output
|
/// Equivalent to assert_eq! but with prettier output
|
||||||
pub fn test_eq(actual: &str, expected: &str) {
|
pub fn test_eq(actual: &str, expected: &str) {
|
||||||
if actual != expected {
|
if actual != expected {
|
||||||
panic!(format!("\nexpected:\n{}\nactual:\n{}\n", expected, actual));
|
panic!(format!("\nexpected:\n{:?}\nactual:\n{:?}\n", expected, actual));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user