diff options
Diffstat (limited to 'tests/CoreTests')
-rw-r--r-- | tests/CoreTests/com/android/internal/telephony/SimUtilsTest.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/CoreTests/com/android/internal/telephony/SimUtilsTest.java b/tests/CoreTests/com/android/internal/telephony/SimUtilsTest.java index e733af9..6f25fd9 100644 --- a/tests/CoreTests/com/android/internal/telephony/SimUtilsTest.java +++ b/tests/CoreTests/com/android/internal/telephony/SimUtilsTest.java @@ -44,13 +44,22 @@ public class SimUtilsTest extends TestCase { assertEquals("890", IccUtils.bcdToString(data, 0, data.length)); /* - * bcdByteToInt() - */ + * gsmBcdByteToInt() + */ + + assertEquals(98, IccUtils.gsmBcdByteToInt((byte) 0x89)); + + // Out of range is treated as 0 + assertEquals(8, IccUtils.gsmBcdByteToInt((byte) 0x8c)); - assertEquals(98, IccUtils.bcdByteToInt((byte) 0x89)); + /* + * cdmaBcdByteToInt() + */ + + assertEquals(89, IccUtils.cdmaBcdByteToInt((byte) 0x89)); // Out of range is treated as 0 - assertEquals(8, IccUtils.bcdByteToInt((byte) 0x8c)); + assertEquals(80, IccUtils.gsmBcdByteToInt((byte) 0x8c)); /* * adnStringFieldToString() @@ -76,4 +85,3 @@ public class SimUtilsTest extends TestCase { } } - |