mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -10,8 +10,9 @@
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
|
||||
package org.dromara.hutool.core.convert;
|
||||
package org.dromara.hutool.core.math;
|
||||
|
||||
import org.dromara.hutool.core.convert.Convert;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@@ -13,7 +13,6 @@
|
||||
package org.dromara.hutool.core.math;
|
||||
|
||||
import org.dromara.hutool.core.lang.Console;
|
||||
import org.dromara.hutool.core.math.NumberUtil;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -380,6 +379,18 @@ public class NumberUtilTest {
|
||||
Assertions.assertEquals(new BigDecimal("9.0E+7"), NumberUtil.toBigDecimal("9.0E+7"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void emptyToBigDecimalTest(){
|
||||
Assertions.assertThrows(IllegalArgumentException.class,()->{
|
||||
NumberUtil.toBigDecimal("");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void naNToBigDecimalTest(){
|
||||
Assertions.assertEquals(BigDecimal.ZERO, NumberUtil.toBigDecimal("NaN"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issue2878Test() throws ParseException {
|
||||
// https://github.com/dromara/hutool/issues/2878
|
||||
|
@@ -10,8 +10,9 @@
|
||||
* See the Mulan PSL v2 for more details.
|
||||
*/
|
||||
|
||||
package org.dromara.hutool.core.convert;
|
||||
package org.dromara.hutool.core.math;
|
||||
|
||||
import org.dromara.hutool.core.math.NumberWordFormatter;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
Reference in New Issue
Block a user