mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
@@ -73,9 +73,9 @@ public class ChineseNumberFormatter {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 NumberChineseFormatter 默认对象
|
||||
* 获取 ChineseNumberFormatter 默认对象
|
||||
*
|
||||
* @return NumberChineseFormatter
|
||||
* @return ChineseNumberFormatter
|
||||
*/
|
||||
public static ChineseNumberFormatter of() {
|
||||
return new ChineseNumberFormatter();
|
||||
|
@@ -362,4 +362,10 @@ public class ChineseNumberFormatterTest {
|
||||
assertEquals("负十一", formatter.format(new BigDecimal("-11")));
|
||||
assertEquals("负十", formatter.format(new BigDecimal("-10")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void issueIAZ8UBTest() {
|
||||
final String format = ChineseNumberFormatter.of().setUseTraditional(true).format(9810005022.12D);
|
||||
assertEquals("玖拾捌亿壹仟万零伍仟零贰拾贰点壹贰", format);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user