mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 04:08:40 +00:00
parent
c97f11af7b
commit
39e1331cfa
@ -224,6 +224,21 @@ fn make_contiguous_head_to_end() {
|
|||||||
assert_eq!((&['A', 'B', 'C'] as &[_], &[] as &[_]), dq.as_slices());
|
assert_eq!((&['A', 'B', 'C'] as &[_], &[] as &[_]), dq.as_slices());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn make_contiguous_head_to_end_2() {
|
||||||
|
// Another test case for #79808, taken from #80293.
|
||||||
|
|
||||||
|
let mut dq = VecDeque::from_iter(0..6);
|
||||||
|
dq.pop_front();
|
||||||
|
dq.pop_front();
|
||||||
|
dq.push_back(6);
|
||||||
|
dq.push_back(7);
|
||||||
|
dq.push_back(8);
|
||||||
|
dq.make_contiguous();
|
||||||
|
let collected: Vec<_> = dq.iter().copied().collect();
|
||||||
|
assert_eq!(dq.as_slices(), (&collected[..], &[] as &[_]));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_remove() {
|
fn test_remove() {
|
||||||
// This test checks that every single combination of tail position, length, and
|
// This test checks that every single combination of tail position, length, and
|
||||||
|
Loading…
Reference in New Issue
Block a user