mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
commit
cc1b22d45f
|
@ -19,7 +19,8 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn check_icecream() {
|
||||
assert_eq!(maybe_icecream(10), Some(5));
|
||||
assert_eq!(maybe_icecream(9), Some(5));
|
||||
assert_eq!(maybe_icecream(10), Some(0));
|
||||
assert_eq!(maybe_icecream(23), Some(0));
|
||||
assert_eq!(maybe_icecream(22), Some(0));
|
||||
assert_eq!(maybe_icecream(25), None);
|
||||
|
@ -29,6 +30,6 @@ mod tests {
|
|||
fn raw_value() {
|
||||
// TODO: Fix this test. How do you get at the value contained in the Option?
|
||||
let icecreams = maybe_icecream(12);
|
||||
assert_eq!(icecreams, 5);
|
||||
assert_eq!(icecreams, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue