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

@@ -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);
}
}