test VecDeque debug printing

This commit is contained in:
Ralf Jung 2019-02-15 10:41:12 +01:00
parent 526b8aec28
commit 5190b5b1e8
2 changed files with 10 additions and 0 deletions

View File

@ -9,6 +9,14 @@ fn main() {
let mut src = VecDeque::new();
src.push_front(Box::new(2));
dst.append(&mut src);
for a in dst.iter() {
assert_eq!(**a, 2);
}
// Regression test for Debug and Diaplay impl's
println!("{:?} {:?}", dst, dst.iter());
println!("{:?}", VecDeque::<u32>::new().iter());
for a in dst {
assert_eq!(*a, 2);
}

View File

@ -0,0 +1,2 @@
[2, 2] Iter([2, 2], [])
Iter([], [])