Skip to content

Commit

Permalink
tests: add test_element_smaller_than_min
Browse files Browse the repository at this point in the history
the `break` statement executed when the search reaches the leftmost
column without finding the target element
  • Loading branch information
sozelfist committed Oct 17, 2024
1 parent b8fc4fe commit 4c31581
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/searching/saddleback_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,14 @@ mod tests {
200,
(2, 3),
),
test_element_smaller_than_min: (
vec![
vec![1, 10, 100],
vec![2, 20, 200],
vec![3, 30, 300],
],
0,
(0, 0),
),
}
}

0 comments on commit 4c31581

Please sign in to comment.