File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
hutool-core/src/test/java/cn/hutool/core/math Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 24
24
* 【core 】 修复NamingCase中转换下划线字母+数字转换问题(issue#2070@Github)
25
25
* 【core 】 修复split空判断不一致问题(pr#496@Gitee)
26
26
* 【crypto 】 修复SM2.getDHex()前导0丢失,然后导致获取密钥错误(pr#2073@Github)
27
+ * 【core 】 修复关于Calculator.conversion()方法EmptyStackException的bug(pr#2076@Github)
27
28
28
29
-------------------------------------------------------------------------------------------------------------
29
30
# 5.7.18 (2021-12-25)
Original file line number Diff line number Diff line change 1
1
package cn .hutool .core .math ;
2
2
3
3
import org .junit .Assert ;
4
- import org .junit .Ignore ;
5
4
import org .junit .Test ;
6
5
7
6
public class CalculatorTest {
@@ -42,4 +41,11 @@ public void conversationTest6() {
42
41
final double conversion = Calculator .conversion ("-((2.12-2) * 100)" );
43
42
Assert .assertEquals (-1D * (2.12 - 2 ) * 100 , conversion , 2 );
44
43
}
44
+
45
+ @ Test
46
+ public void conversationTest7 () {
47
+ //https://gitee.com/dromara/hutool/issues/I4KONB
48
+ final double conversion = Calculator .conversion ("((-2395+0) * 0.3+140.24+35+90)/30" );
49
+ Assert .assertEquals (-15.11 , conversion , 2 );
50
+ }
45
51
}
You can’t perform that action at this time.
0 commit comments