about summary refs log tree commit diff
path: root/src/librustdoc/clean/utils/tests.rs
blob: 65c8255b2f2745778494ea146d1e669827b4b912 (plain)
1
2
3
4
5
6
7
8
9
10
11
use super::*;

#[test]
fn int_format_decimal() {
    assert_eq!(format_integer_with_underscore_sep(12345678, false), "12_345_678");
    assert_eq!(format_integer_with_underscore_sep(123, false), "123");
    assert_eq!(format_integer_with_underscore_sep(123459, false), "123_459");
    assert_eq!(format_integer_with_underscore_sep(12345678, true), "-12_345_678");
    assert_eq!(format_integer_with_underscore_sep(123, true), "-123");
    assert_eq!(format_integer_with_underscore_sep(123459, true), "-123_459");
}