summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliv <mokou@fastmail.com>2023-06-12 12:20:36 +0200
committerGitHub <noreply@github.com>2023-06-12 12:20:36 +0200
commit171d20ce3ed6f2d1ec1075c63777b2511fa4f5cd (patch)
tree682de526fc78125e95062fa6852d0dea94310fc0
parentc2bb9ebd8e8713889ba092f831176e58c8060054 (diff)
parentbbfb4c7e63dc59a4e8afbb8d2a10b35414782256 (diff)
Merge pull request #1546 from b-apperlo/b-apperlo-patch-1
feat: added test function to hashmaps2.rs
-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);
+ }
+ }
}