Home
last modified time | relevance | path

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

/libcore/json/src/test/java/org/json/
DSelfUseTest.java67 @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()
DJSONObjectTest.java101 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()
DJSONArrayTest.java228 assertEquals(0, array.optLong(0, 1L)); in testNumbers()
/libcore/json/src/main/java/org/json/
DJSONArray.java441 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
DJSONObject.java527 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