Skip to content

Commit

Permalink
Add a test for issue #53529
Browse files Browse the repository at this point in the history
  • Loading branch information
MaloJaffre committed Aug 22, 2018
1 parent b85e4cc commit f8d5ed4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/liballoc/collections/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2967,4 +2967,21 @@ mod tests {
}
}

#[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);
}
}

}

0 comments on commit f8d5ed4

Please sign in to comment.