Add PureQueue length check to existing rust tests
This commit is contained in:
parent
63515e2314
commit
57fdba96fe
1 changed files with 2 additions and 0 deletions
|
@ -9,6 +9,7 @@ mod tests {
|
|||
heap.add(-3);
|
||||
heap.add(6);
|
||||
heap.add(1);
|
||||
assert_eq!(heap.len(), 4);
|
||||
assert_eq!(heap.pop(), Some(-3));
|
||||
assert_eq!(heap.pop(), Some(1));
|
||||
assert_eq!(heap.pop(), Some(4));
|
||||
|
@ -19,6 +20,7 @@ mod tests {
|
|||
#[test]
|
||||
fn test_pure_binary_heap_from_iter() {
|
||||
let mut heap = BinaryHeap::from_iter(vec![7, 3, 6, 9]);
|
||||
assert_eq!(heap.len(), 4);
|
||||
assert_eq!(heap.pop(), Some(3));
|
||||
assert_eq!(heap.pop(), Some(6));
|
||||
assert_eq!(heap.pop(), Some(7));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue