mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
expands the coercion tests a little more
This commit is contained in:
parent
0150639119
commit
1967bee236
1 changed files with 3 additions and 0 deletions
|
@ -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"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue