File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/test/java/org/json/junit Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -2025,6 +2025,9 @@ public void jsonObjectOptStringConversion() {
20252025
20262026 // the integer portion of the actual value is larger than a double can hold.
20272027 assertNotEquals ((long )Double .parseDouble ("19007199254740993.35481234487103587486413587843213584" ), jo .optLong ("largeNumber" ));
2028+ assertNotEquals ((int )Double .parseDouble ("19007199254740993.35481234487103587486413587843213584" ), jo .optInt ("largeNumber" ));
2029+ assertEquals (19007199254740992l , (long )Double .parseDouble ("19007199254740993.35481234487103587486413587843213584" ));
2030+ assertEquals (2147483647 , (int )Double .parseDouble ("19007199254740993.35481234487103587486413587843213584" ));
20282031 }
20292032
20302033 /**
You can’t perform that action at this time.
0 commit comments