From 81bee708775c204737a6e8752736b12fc9f6d091 Mon Sep 17 00:00:00 2001 From: Elisabeth Henry Date: Sat, 7 May 2016 14:10:48 +0200 Subject: [PATCH] Use debug printing instead of single printing when a test errors --- src/lib/tests/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/tests/mod.rs b/src/lib/tests/mod.rs index 5e233c0..587408f 100644 --- a/src/lib/tests/mod.rs +++ b/src/lib/tests/mod.rs @@ -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)); } }