Function
case
(expected: bool, value: T, inherent: impl FnOnce(&T) -> bool)
Source from the content-addressed store, hash-verified
| 25 | } |
| 26 | #[track_caller] |
| 27 | fn case<T: Flags + std::fmt::Debug>(expected: bool, value: T, inherent: impl FnOnce(&T) -> bool) { |
| 28 | assert_eq!( |
| 29 | expected, |
| 30 | inherent(&value), |
| 31 | "{:?}.contains_unknown_bits()", |
| 32 | value |
| 33 | ); |
| 34 | assert_eq!( |
| 35 | expected, |
| 36 | Flags::contains_unknown_bits(&value), |
| 37 | "Flags::contains_unknown_bits({:?})", |
| 38 | value |
| 39 | ); |
| 40 | } |
Tested by
no test coverage detected