Home
last modified time | relevance | path

Searched refs:optDouble (Results 1 – 5 of 5) sorted by relevance

/libcore/json/src/test/java/libcore/org/json/
DSelfUseTest.java64 @Override public double optDouble(String key, double defaultValue) {
66 return super.optDouble(key, defaultValue);
99 @Override public double optDouble(int index, double fallback) {
101 return super.optDouble(index, fallback);
149 object.optDouble("foo"); in testObjectOptType()
196 array.optDouble(3); in testArrayOptType()
DJSONObjectTest.java101 assertEquals(Double.NaN, object.optDouble("foo")); in testEmptyObject()
102 assertEquals(5.0, object.optDouble("foo", 5.0)); in testEmptyObject()
303 assertEquals(Double.MAX_VALUE, object.optDouble("baz")); in testNumbers()
307 assertEquals(Double.MAX_VALUE, object.optDouble("baz")); in testNumbers()
309 assertEquals(Double.MIN_VALUE, object.optDouble("foo", 5.0d)); in testNumbers()
451 assertEquals(Double.NaN, object.optDouble("quux")); in testStrings()
452 assertEquals(-1.0d, object.optDouble("quux", -1.0d)); in testStrings()
853 assertEquals(Double.NaN, object.optDouble(null)); in testOptNull()
860 assertEquals(0.0d, object.optDouble(null, 0.0d)); in testOptNull()
DJSONArrayTest.java232 assertEquals(Double.MIN_VALUE, array.optDouble(0)); in testNumbers()
299 assertEquals(Double.NaN, array.optDouble(3)); in testStrings()
300 assertEquals(-1.0d, array.optDouble(3, -1.0d)); in testStrings()
/libcore/json/src/main/java/org/json/
DJSONArray.java375 public double optDouble(int index) { in optDouble() method in JSONArray
376 return optDouble(index, Double.NaN); in optDouble()
383 public double optDouble(int index, double fallback) { in optDouble() method in JSONArray
DJSONObject.java467 public double optDouble(@Nullable String name) { in optDouble() method in JSONObject
468 return optDouble(name, Double.NaN); in optDouble()
475 public double optDouble(@Nullable String name, double fallback) { in optDouble() method in JSONObject