use core::num::dec2flt::parse::ParseResult::{Invalid, Valid}; use core::num::dec2flt::parse::{parse_decimal, Decimal}; #[test] fn missing_pieces() { let permutations = &[".e", "1e", "e4", "e", ".12e", "321.e", "32.12e+", "12.32e-"]; for &s in permutations { assert_eq!(parse_decimal(s), Invalid); } } #[test] fn invalid_chars() { let invalid = "r,?