More logging when test fails.
This commit is contained in:
parent
da717aeae1
commit
b3ca6e1cb3
@ -211,8 +211,9 @@ fn test_roundtrip_library() -> Result<(), Box<dyn Error>> {
|
||||
fn validate_duplicates(got: Vec<(&Movie, Vec<&Movie>)>, want: Vec<(Movie, Vec<Movie>)>) {
|
||||
assert_eq!(got.len(), want.len());
|
||||
for (g, w) in got.iter().zip(&want) {
|
||||
assert_eq!(g.0, &w.0);
|
||||
assert_eq!(g.1, w.1.iter().map(|v| v).collect::<Vec<_>>());
|
||||
assert_eq!(g.0, &w.0, "Got:\n{:?}\nWant:\n{:?}", g, w);
|
||||
let want = w.1.iter().map(|v| v).collect::<Vec<_>>();
|
||||
assert_eq!(g.1, want, "Got:\n{:?}\nWant:\n{:?}", g, w);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user