Skip to content

Commit 5190b5b

Browse files
committed
test VecDeque debug printing
1 parent 526b8ae commit 5190b5b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/run-pass/vecdeque.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ fn main() {
99
let mut src = VecDeque::new();
1010
src.push_front(Box::new(2));
1111
dst.append(&mut src);
12+
for a in dst.iter() {
13+
assert_eq!(**a, 2);
14+
}
15+
16+
// Regression test for Debug and Diaplay impl's
17+
println!("{:?} {:?}", dst, dst.iter());
18+
println!("{:?}", VecDeque::<u32>::new().iter());
19+
1220
for a in dst {
1321
assert_eq!(*a, 2);
1422
}

tests/run-pass/vecdeque.stdout

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[2, 2] Iter([2, 2], [])
2+
Iter([], [])

0 commit comments

Comments
 (0)