This commit is contained in:
Looly 2020-10-14 17:55:45 +08:00
parent 3920d79e38
commit 1b4424f7fa

View File

@ -159,6 +159,7 @@ public class JSONUtilTest {
public void doubleTest(){
String json = "{\"test\": 12.00}";
final JSONObject jsonObject = JSONUtil.parseObj(json);
//noinspection BigDecimalMethodWithoutRoundingCalled
Assert.assertEquals("12.00", jsonObject.getBigDecimal("test").setScale(2).toString());
}
}