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.java56 assertEquals(1L, ParseUtils.parseLongWithBase(null, 10, 1)); in testParseLongWithBase()
57 assertEquals(1L, ParseUtils.parseLongWithBase("", 10, 1)); in testParseLongWithBase()
58 assertEquals(1L, ParseUtils.parseLongWithBase("1x", 10, 1)); in testParseLongWithBase()
59 assertEquals(2L, ParseUtils.parseLongWithBase("2", 10, 1)); in testParseLongWithBase()
60 assertEquals(10L, ParseUtils.parseLongWithBase("10", 10, 1)); in testParseLongWithBase()
61 assertEquals(3L, ParseUtils.parseLongWithBase("10", 3, 1)); in testParseLongWithBase()
63 assertEquals(3L, ParseUtils.parseLongWithBase("+10", 3, 1)); in testParseLongWithBase()
64 assertEquals(-3L, ParseUtils.parseLongWithBase("-10", 3, 1)); in testParseLongWithBase()
66 assertEquals(10_000_000_000L, ParseUtils.parseLongWithBase("+10000000000", 10, 1)); in testParseLongWithBase()
67 assertEquals(-10_000_000_000L, ParseUtils.parseLongWithBase("-10000000000", 10, 1)); in testParseLongWithBase()
[all …]
/frameworks/base/core/java/com/android/internal/util/
DParseUtils.java49 return parseLongWithBase(value, 10, defValue); in parseLong()
53 public static long parseLongWithBase(@Nullable String value, int base, long defValue) { in parseLongWithBase() method in ParseUtils