Function
case
(
expected: T::Bits,
value: T,
inherent: impl FnOnce(&T) -> T::Bits,
)
Source from the content-addressed store, hash-verified
| 37 | |
| 38 | #[track_caller] |
| 39 | fn case<T: Flags + std::fmt::Debug>( |
| 40 | expected: T::Bits, |
| 41 | value: T, |
| 42 | inherent: impl FnOnce(&T) -> T::Bits, |
| 43 | ) where |
| 44 | T::Bits: std::fmt::Debug + PartialEq, |
| 45 | { |
| 46 | assert_eq!(expected, inherent(&value), "{:?}.unknown_bits()", value); |
| 47 | assert_eq!( |
| 48 | expected, |
| 49 | Flags::unknown_bits(&value), |
| 50 | "Flags::unknown_bits({:?})", |
| 51 | value, |
| 52 | ); |
| 53 | } |
Tested by
no test coverage detected