Skip to content

Commit 9280d17

Browse files
committed
test VecDeque
1 parent bb5079b commit 9280d17

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/run-pass/vecdeque.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use std::collections::VecDeque;
2+
3+
fn main() {
4+
let mut dst = VecDeque::new();
5+
dst.push_front(Box::new(1));
6+
dst.push_front(Box::new(2));
7+
dst.pop_back();
8+
9+
let mut src = VecDeque::new();
10+
src.push_front(Box::new(2));
11+
dst.append(&mut src);
12+
for a in dst {
13+
assert_eq!(*a, 2);
14+
}
15+
}

0 commit comments

Comments
 (0)