Fix libcore tests

This commit is contained in:
varkor 2019-10-09 00:48:47 +01:00
parent 50985b012a
commit 6ea469712d
1 changed files with 4 additions and 4 deletions

View File

@ -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));
}