Add unit tests for null/empty phone number in isInternationalNumber.
Tyler Gunn [Wed, 31 May 2017 21:34:39 +0000 (14:34 -0700)]
Test: THIS is a test.
Bug: 62162029
Change-Id: I518341c915cbd7674da812c426c9081d85cdac7b

tests/telephonytests/src/com/android/internal/telephony/PhoneNumberUtilsTest.java

index 9e72d98..a1d2a71 100644 (file)
@@ -721,6 +721,8 @@ public class PhoneNumberUtilsTest {
     @SmallTest
     @Test
     public void testIsInternational() {
+        assertFalse(PhoneNumberUtils.isInternationalNumber("", "US"));
+        assertFalse(PhoneNumberUtils.isInternationalNumber(null, "US"));
         assertFalse(PhoneNumberUtils.isInternationalNumber("+16505551212", "US"));
         assertTrue(PhoneNumberUtils.isInternationalNumber("+16505551212", "UK"));
         assertTrue(PhoneNumberUtils.isInternationalNumber("+16505551212", "JP"));