Searched refs:optLong (Results 1 – 5 of 5) sorted by relevance
/libcore/json/src/test/java/org/json/ |
D | SelfUseTest.java | 67 @Override public long optLong(String key, long defaultValue) { 69 return super.optLong(key, defaultValue); 98 @Override public long optLong(int index, long fallback) { 100 return super.optLong(index, fallback); 150 object.optLong("foo"); in testObjectOptType() 197 array.optLong(3); in testArrayOptType()
|
D | JSONObjectTest.java | 101 assertEquals(0, object.optLong("foo")); in testEmptyObject() 102 assertEquals(Long.MAX_VALUE-1, object.optLong("foo", Long.MAX_VALUE-1)); in testEmptyObject() 296 assertEquals(9223372036854775806L, object.optLong("bar")); in testNumbers() 300 assertEquals(9223372036854775806L, object.optLong("bar")); in testNumbers() 304 assertEquals(9223372036854775806L, object.optLong("bar", 1L)); in testNumbers() 305 assertEquals(Long.MAX_VALUE, object.optLong("baz", 1L)); in testNumbers() 843 assertEquals(0L, object.optLong(null)); in testOptNull() 850 assertEquals(1L, object.optLong(null, 1L)); in testOptNull()
|
D | JSONArrayTest.java | 228 assertEquals(0, array.optLong(0, 1L)); in testNumbers()
|
/libcore/json/src/main/java/org/json/ |
D | JSONArray.java | 441 public long optLong(int index) { in optLong() method in JSONArray 442 return optLong(index, 0L); in optLong() 449 public long optLong(int index, long fallback) { in optLong() method in JSONArray
|
D | JSONObject.java | 527 public long optLong(String name) { in optLong() method in JSONObject 528 return optLong(name, 0L); in optLong() 537 public long optLong(String name, long fallback) { in optLong() method in JSONObject
|