(
value: T,
debug: &str,
uhex: &str,
lhex: &str,
oct: &str,
bin: &str,
)
| 80 | |
| 81 | #[track_caller] |
| 82 | fn case< |
| 83 | T: std::fmt::Debug + std::fmt::UpperHex + std::fmt::LowerHex + std::fmt::Octal + std::fmt::Binary, |
| 84 | >( |
| 85 | value: T, |
| 86 | debug: &str, |
| 87 | uhex: &str, |
| 88 | lhex: &str, |
| 89 | oct: &str, |
| 90 | bin: &str, |
| 91 | ) { |
| 92 | assert_eq!(debug, format!("{:?}", value)); |
| 93 | assert_eq!(uhex, format!("{:X}", value)); |
| 94 | assert_eq!(lhex, format!("{:x}", value)); |
| 95 | assert_eq!(oct, format!("{:o}", value)); |
| 96 | assert_eq!(bin, format!("{:b}", value)); |
| 97 | } |