Merge pull request #1546 from b-apperlo/b-apperlo-patch-1
feat: added test function to hashmaps2.rs
This commit is contained in:
commit
171d20ce3e
|
@ -80,4 +80,13 @@ mod tests {
|
||||||
let count = basket.values().sum::<u32>();
|
let count = basket.values().sum::<u32>();
|
||||||
assert!(count > 11);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue