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