Fix libcore tests
This commit is contained in:
parent
50985b012a
commit
6ea469712d
1 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
#[test]
|
||||
fn test_bool_to_option() {
|
||||
assert_eq!(false.then(0), None);
|
||||
assert_eq!(true.then(0), Some(0));
|
||||
assert_eq!(false.then_with(|| 0), None);
|
||||
assert_eq!(true.then_with(|| 0), Some(0));
|
||||
assert_eq!(false.to_option(0), None);
|
||||
assert_eq!(true.to_option(0), Some(0));
|
||||
assert_eq!(false.to_option_with(|| 0), None);
|
||||
assert_eq!(true.to_option_with(|| 0), Some(0));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue