Skip to content

Commit

Permalink
Add a test for Unsorted's consistent order
Browse files Browse the repository at this point in the history
  • Loading branch information
havenwood committed Jun 22, 2024
1 parent 4323fa7 commit 876e2f0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@ fn min_word_count_at_max() {
);
}

#[test]
fn default_case_unsorted_order() {
word_tally_test(
Case::default(),
Sort::Unsorted,
Filters::default(),
&ExpectedFields {
count: 45,
uniq_count: 5,
avg: Some(9.0),
tally: vec![("d", 11), ("123", 9), ("a", 3), ("c", 15), ("b", 7)],
},
);
}

#[test]
fn upper_case_desc_order() {
word_tally_test(
Expand Down

0 comments on commit 876e2f0

Please sign in to comment.