Skip to content

Commit

Permalink
Merge pull request rust-lang#1144 from nico-vromans/patch-1
Browse files Browse the repository at this point in the history
Update options1.rs
  • Loading branch information
shadows-withal authored Aug 16, 2022
2 parents 8dfffe8 + e8122da commit cc1b22d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions exercises/options/options1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
}

0 comments on commit cc1b22d

Please sign in to comment.