Home
last modified time | relevance | path

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

/libcore/json/src/test/java/libcore/org/json/
DSelfUseTest.java72 @Override public long optLong(String key, long defaultValue) {
74 return super.optLong(key, defaultValue);
103 @Override public long optLong(int index, long fallback) {
105 return super.optLong(index, fallback);
155 object.optLong("foo"); in testObjectOptType()
202 array.optLong(3); in testArrayOptType()
DJSONObjectTest.java107 assertEquals(0, object.optLong("foo")); in testEmptyObject()
108 assertEquals(Long.MAX_VALUE-1, object.optLong("foo", Long.MAX_VALUE-1)); in testEmptyObject()
302 assertEquals(9223372036854775806L, object.optLong("bar")); in testNumbers()
306 assertEquals(9223372036854775806L, object.optLong("bar")); in testNumbers()
310 assertEquals(9223372036854775806L, object.optLong("bar", 1L)); in testNumbers()
311 assertEquals(Long.MAX_VALUE, object.optLong("baz", 1L)); in testNumbers()
855 assertEquals(0L, object.optLong(null)); in testOptNull()
862 assertEquals(1L, object.optLong(null, 1L)); in testOptNull()
DJSONArrayTest.java233 assertEquals(0, array.optLong(0, 1L)); in testNumbers()
/libcore/json/src/main/java/org/json/
DJSONArray.java443 public long optLong(int index) { in optLong() method in JSONArray
444 return optLong(index, 0L); in optLong()
451 public long optLong(int index, long fallback) { in optLong() method in JSONArray
DJSONObject.java538 public long optLong(@Nullable String name) { in optLong() method in JSONObject
539 return optLong(name, 0L); in optLong()
548 public long optLong(@Nullable String name, long fallback) { in optLong() method in JSONObject