diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-01 11:19:19 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-07-01 11:19:19 -0700 |
commit | 4a301cb49527dfe941a8f6ac3c65a14ee42e01d1 (patch) | |
tree | 00b5b2235663a6bd1c6855beb7fd299acb68015f /tests/CoreTests | |
parent | a2b2223817a536c22ff314886c90ed85eaef07ed (diff) | |
parent | 8aadf7ae278961926de5452a46863503303735cf (diff) | |
download | frameworks_base-4a301cb49527dfe941a8f6ac3c65a14ee42e01d1.zip frameworks_base-4a301cb49527dfe941a8f6ac3c65a14ee42e01d1.tar.gz frameworks_base-4a301cb49527dfe941a8f6ac3c65a14ee42e01d1.tar.bz2 |
am 8aadf7ae: Merge change 5359 into donut
Merge commit '8aadf7ae278961926de5452a46863503303735cf'
* commit '8aadf7ae278961926de5452a46863503303735cf':
fix potential string index problems in PhoneNumberUtils.numberToCalledPartyBCDHelper
Diffstat (limited to 'tests/CoreTests')
-rw-r--r-- | tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java b/tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java index ae11ed1..ff73b32 100644 --- a/tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java +++ b/tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java @@ -93,6 +93,13 @@ public class PhoneNumberUtilsTest extends TestCase { assertEquals(b[i], bRet[i]); } + bRet = PhoneNumberUtils.networkPortionToCalledPartyBCDWithLength("+17005550020"); + assertEquals(8, bRet.length); + assertEquals(bRet[0], 7); + for (int i = 1; i < 8; i++) { + assertEquals(b[i - 1], bRet[i]); + } + bRet = PhoneNumberUtils.networkPortionToCalledPartyBCD("7005550020"); assertEquals("7005550020", PhoneNumberUtils.calledPartyBCDToString(bRet, 0, bRet.length)); |