diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-13 15:13:58 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-13 15:13:58 -0700 |
commit | 9e0426087b35ddbe965b71f929ef4109a2299b2c (patch) | |
tree | 261bc9213cd5960b2b1c375bb5f0d946ef6e2baa /tests | |
parent | a646c56b21599d6fc56eaeb06e79bab298e57bb4 (diff) | |
parent | 9688c6046fdbf6a24e3541bd6342995b4605fd5d (diff) | |
download | frameworks_base-9e0426087b35ddbe965b71f929ef4109a2299b2c.zip frameworks_base-9e0426087b35ddbe965b71f929ef4109a2299b2c.tar.gz frameworks_base-9e0426087b35ddbe965b71f929ef4109a2299b2c.tar.bz2 |
Merge change 21166
* changes:
Rename bcdByteToInt to gsmBcdByteToInt and beBcdByteToInt to cdmaBcdByteToInt.
Diffstat (limited to 'tests')
-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 { } } - |