mirror of
https://github.com/stleary/JSON-java.git
synced 2026-01-24 00:03:17 -05:00
Fixed incorrect cast getting float from array
Added test for getting float from array
This commit is contained in:
@@ -364,6 +364,8 @@ public class JSONArrayTest {
|
||||
new Double(23.45e-4).equals(jsonArray.getDouble(5)));
|
||||
assertTrue("Array string double",
|
||||
new Double(23.45).equals(jsonArray.getDouble(6)));
|
||||
assertTrue("Array double can be float",
|
||||
new Float(23.45e-4f).equals(jsonArray.getFloat(5)));
|
||||
// ints
|
||||
assertTrue("Array value int",
|
||||
new Integer(42).equals(jsonArray.getInt(7)));
|
||||
|
||||
Reference in New Issue
Block a user