mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fixed #1155
This commit is contained in:
parent
d97db8c2e1
commit
29b6de444f
@ -30,6 +30,17 @@ public class DataSizeUtilTest {
|
||||
|
||||
parse = DataSizeUtil.parse("3.1mb");
|
||||
Assert.assertEquals(3250585, parse);
|
||||
|
||||
parse = DataSizeUtil.parse("3.1");
|
||||
Assert.assertEquals(3, parse);
|
||||
|
||||
try {
|
||||
parse = DataSizeUtil.parse("3.1.3");
|
||||
} catch (IllegalArgumentException ie) {
|
||||
Assert.assertEquals("'3.1.3' is not a valid data size", ie.getMessage());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user