diff options
author | Wei Huang <weih@google.com> | 2009-10-22 18:03:48 -0700 |
---|---|---|
committer | Wei Huang <weih@google.com> | 2009-10-23 01:17:17 -0700 |
commit | fd7b4f1d12779a0363e98a37e7f5a7ccacba5ee8 (patch) | |
tree | d77fb4109eea7683ddf0429285bab657e25995e6 /tests/CoreTests | |
parent | 7fad4ee736b8a64c1acac7a9b40384f68562b664 (diff) | |
download | frameworks_base-fd7b4f1d12779a0363e98a37e7f5a7ccacba5ee8.zip frameworks_base-fd7b4f1d12779a0363e98a37e7f5a7ccacba5ee8.tar.gz frameworks_base-fd7b4f1d12779a0363e98a37e7f5a7ccacba5ee8.tar.bz2 |
bug #2180646: make comparing "404-04" and "40404" return true in PhoneNumberUtils.compare().
- when comparing two numbers whose dialable char length is less than the MIN_MATCH (7), treat them as equal if the dialable portion of the numbers match.
- update unit test.
Diffstat (limited to 'tests/CoreTests')
-rw-r--r-- | tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java b/tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java index a4e253e..aa2981b 100644 --- a/tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java +++ b/tests/CoreTests/com/android/internal/telephony/PhoneNumberUtilsTest.java @@ -314,6 +314,9 @@ public class PhoneNumberUtilsTest extends TestCase { // 444 is not a valid country code, but // matchIntlPrefixAndCC doesnt know this assertTrue(PhoneNumberUtils.compare("+444 207 792 3490", "0 207 792 3490")); + + // compare SMS short code + assertTrue(PhoneNumberUtils.compare("404-04", "40404")); } |