()
| 809 | |
| 810 | #[test] |
| 811 | fn insert_if() { |
| 812 | let mut example = NONE; |
| 813 | assert!(example.is_none().to_bool()); |
| 814 | |
| 815 | example.insert_if(&42, Choice::FALSE); |
| 816 | assert!(example.is_none().to_bool()); |
| 817 | |
| 818 | example.insert_if(&42, Choice::TRUE); |
| 819 | assert_eq!(example.unwrap(), 42); |
| 820 | } |
| 821 | |
| 822 | #[test] |
| 823 | fn map() { |