This commit is contained in:
Looly 2021-07-08 01:12:47 +08:00
parent 2b824561ea
commit 5c6e548db2
2 changed files with 12 additions and 3 deletions

View File

@ -34,6 +34,15 @@ public class NumberChineseFormatterTest {
Assert.assertEquals("一十", f1); Assert.assertEquals("一十", f1);
} }
@Test
public void formatTest3() {
String f1 = NumberChineseFormatter.format(50008000, false, false);
Assert.assertEquals("五千万零八千", f1);
f1 = NumberChineseFormatter.format(100350089, false, false);
Assert.assertEquals("一亿零三十五万零八十九\"", f1);
}
@Test @Test
public void formatTraditionalTest() { public void formatTraditionalTest() {
String f1 = NumberChineseFormatter.format(10889.72356, true); String f1 = NumberChineseFormatter.format(10889.72356, true);