1
0
Fork 0
mirror of https://github.com/lise-henry/crowbook synced 2024-06-20 03:09:29 +02:00

Use debug printing instead of single printing when a test errors

This commit is contained in:
Elisabeth Henry 2016-05-07 14:10:48 +02:00
parent 2b37374a8f
commit 81bee70877

View File

@ -1,7 +1,7 @@
/// Equivalent to assert_eq! but with prettier output
pub fn test_eq(actual: &str, expected: &str) {
if actual != expected {
panic!(format!("\nexpected:\n{}\nactual:\n{}\n", expected, actual));
panic!(format!("\nexpected:\n{:?}\nactual:\n{:?}\n", expected, actual));
}
}