TommyLemon / APIAuto

☔ 敏捷开发最强大易用的接口工具,机器学习零代码测试、生成代码与静态检查、生成文档与光标悬浮注释,腾讯、华为、SHEIN、传音、工行等使用 ☔ The most advanced tool for HTTP API. Testing with machine learning, generating codes and static analysis, generating comments and floating hints. Used by Tencent, Huawei, SHEIN, TRANSSION, ICBC, etc.
http://apijson.cn/api
Apache License 2.0
1.96k stars 247 forks source link

【UnitAuto 发现 bug】StringUtil.getPrice(String) 对 "2.025" 四舍五入错误,结果为 2.02,应该为 2.03 #22

Open TommyLemon opened 2 years ago

TommyLemon commented 2 years ago

对应方法 https://github.com/TommyLemon/UnitAuto/blob/master/UnitAuto-Java/src/main/java/unitauto/StringUtil.java#L637-L643

image

测试用例 http://apijson.cn/unit/?send=true&type=String&url=unitauto.StringUtil.getPrice&json={%22static%22:true,%22methodArgs%22:[{%22type%22:%22String%22,%22value%22:%222.025%22}]}

image