Add a test for issue #53529

This commit is contained in:
MaloJaffre 2018-08-22 10:22:21 +02:00
parent b85e4cc8fa
commit f8d5ed47e5

View File

@ -2967,4 +2967,21 @@ fn create_vec_and_test_convert(cap: usize, offset: usize, len: usize) {
}
}
#[test]
fn issue_53529() {
use boxed::Box;
let mut dst = VecDeque::new();
dst.push_front(Box::new(1));
dst.push_front(Box::new(2));
assert_eq!(*dst.pop_back().unwrap(), 1);
let mut src = VecDeque::new();
src.push_front(Box::new(2));
dst.append(&mut src);
for a in dst {
assert_eq!(*a, 2);
}
}
}