mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
fix
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package cn.hutool.core.io.unit;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class DataSizeUtilTest {
|
||||
|
||||
@Test
|
||||
public void parseTest(){
|
||||
long parse = DataSizeUtil.parse("3M");
|
||||
Assert.assertEquals(3145728, parse);
|
||||
|
||||
parse = DataSizeUtil.parse("3m");
|
||||
Assert.assertEquals(3145728, parse);
|
||||
|
||||
parse = DataSizeUtil.parse("3MB");
|
||||
Assert.assertEquals(3145728, parse);
|
||||
|
||||
parse = DataSizeUtil.parse("3mb");
|
||||
Assert.assertEquals(3145728, parse);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user