This commit is contained in:
Looly 2022-01-07 19:45:31 +08:00
parent 2d2cb4590d
commit 38dd205b56
2 changed files with 8 additions and 1 deletions

View File

@ -24,6 +24,7 @@
* 【core 】 修复NamingCase中转换下划线字母+数字转换问题issue#2070@Github
* 【core 】 修复split空判断不一致问题pr#496@Gitee
* 【crypto 】 修复SM2.getDHex()前导0丢失,然后导致获取密钥错误pr#2073@Github
* 【core 】 修复关于Calculator.conversion()方法EmptyStackException的bugpr#2076@Github
-------------------------------------------------------------------------------------------------------------
# 5.7.18 (2021-12-25)

View File

@ -1,7 +1,6 @@
package cn.hutool.core.math;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
public class CalculatorTest {
@ -42,4 +41,11 @@ public class CalculatorTest {
final double conversion = Calculator.conversion("-((2.12-2) * 100)");
Assert.assertEquals(-1D * (2.12 - 2) * 100, conversion, 2);
}
@Test
public void conversationTest7() {
//https://gitee.com/dromara/hutool/issues/I4KONB
final double conversion = Calculator.conversion("((-2395+0) * 0.3+140.24+35+90)/30");
Assert.assertEquals(-15.11, conversion, 2);
}
}