()
| 744 | |
| 745 | #[test] |
| 746 | fn from_u8_nz() { |
| 747 | assert!(Choice::from_u8_nz(0).eq(Choice::FALSE).to_bool()); |
| 748 | assert!(Choice::from_u8_nz(1).eq(Choice::TRUE).to_bool()); |
| 749 | assert!(Choice::from_u8_nz(2).eq(Choice::TRUE).to_bool()); |
| 750 | } |
| 751 | |
| 752 | #[test] |
| 753 | fn from_u16_eq() { |