Skip to content

Commit 223af5b

Browse files
committed
broken test case of FormatSpec::format_int
1 parent ddaa2ca commit 223af5b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

common/src/format.rs

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

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

0 commit comments

Comments
 (0)