am 31a12429: Merge change 26254 into eclair

Merge commit '31a12429b77e87b5047589d251642b975ad35b9a' into eclair-plus-aosp

* commit '31a12429b77e87b5047589d251642b975ad35b9a':
  fix bug 2134685: fix tests for PhoneNumberUtilsTest.
This commit is contained in:
Wei Huang
2009-09-21 14:50:01 -07:00
committed by Android Git Automerger

View File

@@ -257,19 +257,19 @@ public class PhoneNumberUtilsTest extends TestCase {
@SmallTest
public void testToCallerIDIndexable() throws Exception {
assertEquals("14145", PhoneNumberUtils.toCallerIDMinMatch("17005554141"));
assertEquals("14145", PhoneNumberUtils.toCallerIDMinMatch("1-700-555-4141"));
assertEquals("14145", PhoneNumberUtils.toCallerIDMinMatch("1-700-555-4141,1234"));
assertEquals("14145", PhoneNumberUtils.toCallerIDMinMatch("1-700-555-4141;1234"));
assertEquals("1414555", PhoneNumberUtils.toCallerIDMinMatch("17005554141"));
assertEquals("1414555", PhoneNumberUtils.toCallerIDMinMatch("1-700-555-4141"));
assertEquals("1414555", PhoneNumberUtils.toCallerIDMinMatch("1-700-555-4141,1234"));
assertEquals("1414555", PhoneNumberUtils.toCallerIDMinMatch("1-700-555-4141;1234"));
//this seems wrong, or at least useless
assertEquals("NN145", PhoneNumberUtils.toCallerIDMinMatch("1-700-555-41NN"));
assertEquals("NN14555", PhoneNumberUtils.toCallerIDMinMatch("1-700-555-41NN"));
//<shrug> -- these are all not useful, but not terribly wrong
assertEquals("", PhoneNumberUtils.toCallerIDMinMatch(""));
assertEquals("0032", PhoneNumberUtils.toCallerIDMinMatch("2300"));
assertEquals("0032+", PhoneNumberUtils.toCallerIDMinMatch("+2300"));
assertEquals("#130#", PhoneNumberUtils.toCallerIDMinMatch("*#031#"));
assertEquals("#130#*", PhoneNumberUtils.toCallerIDMinMatch("*#031#"));
}
@SmallTest