()
| 688 | |
| 689 | #[test] |
| 690 | fn unwrap_or_macro() { |
| 691 | // Don't actually use this! It's just a test function implemented in variable-time |
| 692 | #[allow(clippy::trivially_copy_pass_by_ref)] |
| 693 | const fn select_vartime(a: &u8, b: &u8, choice: Choice) -> u8 { |
| 694 | if choice.to_bool() { *b } else { *a } |
| 695 | } |
| 696 | |
| 697 | assert_eq!( |
| 698 | unwrap_or!(NONE, OTHER.unwrap(), select_vartime), |
| 699 | OTHER.unwrap() |
| 700 | ); |
| 701 | assert_eq!(unwrap_or!(SOME, OTHER.unwrap(), select_vartime), VALUE); |
| 702 | } |
| 703 | |
| 704 | #[test] |
| 705 | fn ct_eq() { |
nothing calls this directly
no outgoing calls
no test coverage detected