summaryrefslogtreecommitdiff
path: root/exercises
diff options
context:
space:
mode:
Diffstat (limited to 'exercises')
-rw-r--r--exercises/hashmaps/hashmaps2.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/exercises/hashmaps/hashmaps2.rs b/exercises/hashmaps/hashmaps2.rs
index a4f069a..852c076 100644
--- a/exercises/hashmaps/hashmaps2.rs
+++ b/exercises/hashmaps/hashmaps2.rs
@@ -80,4 +80,13 @@ mod tests {
let count = basket.values().sum::<u32>();
assert!(count > 11);
}
+
+ #[test]
+ fn all_fruit_types_in_basket() {
+ let mut basket = get_fruit_basket();
+ fruit_basket(&mut basket);
+ for amount in basket.values() {
+ assert_ne!(amount, &0);
+ }
+ }
}