diff options
| author | Pete Pavlovski <pavlovskipetko@abv.bg> | 2021-04-20 12:15:49 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-20 11:15:49 +0200 |
| commit | 72aaa15e6ab4b72b3422f1c6356396e20a2a2bb8 (patch) | |
| tree | 25aa46bd8e05028de2c58634ed7537d7f7ba8e8e | |
| parent | 3a06de71a8803d1f262f0783edb0cca4a93226df (diff) | |
fix(hashmap2): Update incorrect assertion (#660)
The test description says "at least five types of fruit", but the test itself is checking for exactly five types of fruit, which was a bit misleading for newcomers like me :)
A simple change from "==" to ">=" should do the trick and successfully check for the "at least" condition.
| -rw-r--r-- | exercises/collections/hashmap2.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/collections/hashmap2.rs b/exercises/collections/hashmap2.rs index c8698fe..0abe19a 100644 --- a/exercises/collections/hashmap2.rs +++ b/exercises/collections/hashmap2.rs @@ -68,7 +68,7 @@ mod tests { let mut basket = get_fruit_basket(); fruit_basket(&mut basket); let count_fruit_kinds = basket.len(); - assert!(count_fruit_kinds == 5); + assert!(count_fruit_kinds >= 5); } #[test] |
