use core::num::dec2flt::decimal::Decimal; type FPath = ((i64, u64, bool, bool), Option); const FPATHS_F32: &[FPath] = &[((0, 0, false, false), Some(0.0)), ((0, 0, false, false), Some(0.0))]; const FPATHS_F64: &[FPath] = &[((0, 0, false, false), Some(0.0)), ((0, 0, false, false), Some(0.0))]; #[test] fn check_fast_path_f32() { for ((exponent, mantissa, negative, many_digits), expected) in FPATHS_F32.iter().copied() { let dec = Decimal { exponent, mantissa, negative, many_digits }; let actual = dec.try_fast_path::(); assert_eq!(actual, expected); } } #[test] fn check_fast_path_f64() { for ((exponent, mantissa, negative, many_digits), expected) in FPATHS_F64.iter().copied() { let dec = Decimal { exponent, mantissa, negative, many_digits }; let actual = dec.try_fast_path::(); assert_eq!(actual, expected); } }