()
| 1527 | |
| 1528 | #[test] |
| 1529 | fn test_format_int_sep() { |
| 1530 | let spec = FormatSpec::parse(",").expect(""); |
| 1531 | assert_eq!(spec.grouping_option, Some(FormatGrouping::Comma)); |
| 1532 | assert_eq!( |
| 1533 | spec.format_int(&BigInt::from_str("1234567890123456789012345678").unwrap()), |
| 1534 | Ok("1,234,567,890,123,456,789,012,345,678".to_owned()) |
| 1535 | ); |
| 1536 | } |
| 1537 | |
| 1538 | #[test] |
| 1539 | fn test_format_int_width_and_grouping() { |