Skip to content

Commit

Permalink
test: verify test data
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 authored Oct 16, 2024
1 parent 507e514 commit ec6bbdc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/searching/ternary_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ mod tests {
#[test]
fn $name() {
let (item, arr, expected) = $test_case;
if let Some(expected_index) = expected {
assert_eq!(arr[expected_index], item);
}
assert_eq!(ternary_search(&item, arr), expected);
}
)*
Expand Down

0 comments on commit ec6bbdc

Please sign in to comment.