Home
last modified time | relevance | path

Searched refs:parseLongWithBase (Results 1 – 2 of 2) sorted by relevance

/frameworks/base/core/tests/coretests/src/com/android/internal/util/
DParseUtilsTest.java69 assertEquals(1L, ParseUtils.parseLongWithBase(null, 10, 1)); in testParseLongWithBase()
70 assertEquals(1L, ParseUtils.parseLongWithBase("", 10, 1)); in testParseLongWithBase()
71 assertEquals(1L, ParseUtils.parseLongWithBase("1x", 10, 1)); in testParseLongWithBase()
72 assertEquals(2L, ParseUtils.parseLongWithBase("2", 10, 1)); in testParseLongWithBase()
73 assertEquals(10L, ParseUtils.parseLongWithBase("10", 10, 1)); in testParseLongWithBase()
74 assertEquals(3L, ParseUtils.parseLongWithBase("10", 3, 1)); in testParseLongWithBase()
76 assertEquals(3L, ParseUtils.parseLongWithBase("+10", 3, 1)); in testParseLongWithBase()
77 assertEquals(-3L, ParseUtils.parseLongWithBase("-10", 3, 1)); in testParseLongWithBase()
79 assertEquals(10_000_000_000L, ParseUtils.parseLongWithBase("+10000000000", 10, 1)); in testParseLongWithBase()
80 assertEquals(-10_000_000_000L, ParseUtils.parseLongWithBase("-10000000000", 10, 1)); in testParseLongWithBase()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DParseUtils.java50 return parseLongWithBase(value, 10, defValue); in parseLong()
54 public static long parseLongWithBase(@Nullable String value, int base, long defValue) { in parseLongWithBase() method in ParseUtils