Skip to content

Commit 6a4ce0a

Browse files
committed
broken test case of FormatSpec::format_int
1 parent 3817246 commit 6a4ce0a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

common/src/format.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,16 @@ mod tests {
10271027
);
10281028
}
10291029

1030+
#[test]
1031+
fn test_format_int_sep() {
1032+
let spec = FormatSpec::parse(",").expect("");
1033+
assert_eq!(spec.grouping_option, Some(FormatGrouping::Comma));
1034+
assert_eq!(
1035+
spec.format_int(&BigInt::from_str("1234567890123456789012345678").unwrap()),
1036+
Ok("1,234,567,890,123,456,789,012,345,678".to_owned())
1037+
);
1038+
}
1039+
10301040
#[test]
10311041
fn test_format_parse() {
10321042
let expected = Ok(FormatString {

0 commit comments

Comments
 (0)