mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 10:45:23 +08:00
expands the coercion tests a little more
This commit is contained in:
@@ -2025,6 +2025,9 @@ public class JSONObjectTest {
|
||||
|
||||
// the integer portion of the actual value is larger than a double can hold.
|
||||
assertNotEquals((long)Double.parseDouble("19007199254740993.35481234487103587486413587843213584"), jo.optLong("largeNumber"));
|
||||
assertNotEquals((int)Double.parseDouble("19007199254740993.35481234487103587486413587843213584"), jo.optInt("largeNumber"));
|
||||
assertEquals(19007199254740992l, (long)Double.parseDouble("19007199254740993.35481234487103587486413587843213584"));
|
||||
assertEquals(2147483647, (int)Double.parseDouble("19007199254740993.35481234487103587486413587843213584"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user