mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add test
This commit is contained in:
parent
9db1d175e0
commit
59be04e0a5
@ -2501,7 +2501,8 @@ public class NumberUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 将指定字符串转换为{@link Number} 对象
|
||||
* 将指定字符串转换为{@link Number} 对象<br>
|
||||
* 此方法不支持科学计数法
|
||||
*
|
||||
* @param numberStr Number字符串
|
||||
* @return Number对象
|
||||
|
@ -393,4 +393,11 @@ public class NumberUtilTest {
|
||||
final Set<?> set = Convert.convert(Set.class, ints);
|
||||
Assert.assertEquals(7, set.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void toPlainNumberTest(){
|
||||
String num = "5344.34234e3";
|
||||
final String s = new BigDecimal(num).toPlainString();
|
||||
Assert.assertEquals("5344342.34", s);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user