From 57fdba96fecb7b08404341553aa3012d3bcf470f Mon Sep 17 00:00:00 2001 From: Michael Bradley Date: Mon, 13 Jan 2025 22:10:08 +1300 Subject: [PATCH] Add PureQueue length check to existing rust tests --- tests/pure_binary_heap.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/pure_binary_heap.rs b/tests/pure_binary_heap.rs index 9daeaff..1971127 100644 --- a/tests/pure_binary_heap.rs +++ b/tests/pure_binary_heap.rs @@ -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));