Add function is_not_empty() for increased readability

pull/3/head
sgoudham 3 years ago
parent 1a6af483f6
commit 316d04a7f2
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

File diff suppressed because it is too large Load Diff

@ -30,6 +30,15 @@ fn check_if_bst_is_empty() {
assert!(!bst.is_empty()); assert!(!bst.is_empty());
} }
#[test]
fn check_if_bst_is_not_empty() {
let mut bst = IterativeBST::new();
assert!(!bst.is_not_empty());
bst.insert(1);
assert!(bst.is_not_empty());
}
#[test] #[test]
fn check_if_bst_contains_elements() { fn check_if_bst_contains_elements() {
let mut bst = IterativeBST::new(); let mut bst = IterativeBST::new();

Loading…
Cancel
Save