• Home
  • Raw
  • Download

Lines Matching refs:RegionCode

263 var RegionCode = i18n.phonenumbers.RegionCode;  variable
267 var metadata = phoneUtil.getMetadataForRegion(RegionCode.US);
268 assertEquals(RegionCode.US, metadata.getId());
291 var metadata = phoneUtil.getMetadataForRegion(RegionCode.DE);
292 assertEquals(RegionCode.DE, metadata.getId());
313 var metadata = phoneUtil.getMetadataForRegion(RegionCode.AR);
314 assertEquals(RegionCode.AR, metadata.getId());
440 phoneUtil.getCountryCodeForRegion(RegionCode.AR)));
446 phoneUtil.getCountryCodeForRegion(RegionCode.SE)));
451 assertTrue(phoneUtil.getSupportedRegions().includes(RegionCode.US));
452 assertFalse(phoneUtil.getSupportedRegions().includes(RegionCode.UN001));
463 RegionCode.UN001,
473 phoneUtil.getRegionCodeForCountryCode(callingCode) == RegionCode.ZZ);
486 var types = phoneUtil.getSupportedTypesForRegion(RegionCode.BR);
496 types = phoneUtil.getSupportedTypesForRegion(RegionCode.US);
501 types = phoneUtil.getSupportedTypesForRegion(RegionCode.ZZ);
555 assertTrue(DE_NUMBER.equals(phoneUtil.getExampleNumber(RegionCode.DE)));
558 phoneUtil.getExampleNumberForType(RegionCode.DE, PNT.FIXED_LINE)));
562 RegionCode.DE, PNT.FIXED_LINE_OR_MOBILE)));
564 assertNull(phoneUtil.getExampleNumberForType(RegionCode.US, PNT.VOICEMAIL));
567 phoneUtil.getExampleNumberForType(RegionCode.US, PNT.FIXED_LINE));
568 assertNotNull(phoneUtil.getExampleNumberForType(RegionCode.US, PNT.MOBILE));
570 assertNull(phoneUtil.getExampleNumberForType(RegionCode.CS, PNT.MOBILE));
573 assertNull(phoneUtil.getExampleNumber(RegionCode.UN001));
810 phoneUtil.formatOutOfCountryCallingNumber(US_PREMIUM, RegionCode.DE));
814 phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.BS));
818 phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.PL));
822 phoneUtil.formatOutOfCountryCallingNumber(GB_MOBILE, RegionCode.US));
827 DE_SHORT_NUMBER, RegionCode.GB));
834 DE_SHORT_NUMBER, RegionCode.DE));
838 phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.US));
841 phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.IT));
844 phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.SG));
848 phoneUtil.formatOutOfCountryCallingNumber(SG_NUMBER, RegionCode.SG));
852 phoneUtil.formatOutOfCountryCallingNumber(AR_MOBILE, RegionCode.US));
856 INTERNATIONAL_TOLL_FREE, RegionCode.US));
864 arNumberWithExtn, RegionCode.US));
868 arNumberWithExtn, RegionCode.AU));
872 arNumberWithExtn, RegionCode.AR));
880 phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.AQ));
885 phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.UN001));
894 phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.AU));
900 phoneUtil.formatOutOfCountryCallingNumber(IT_NUMBER, RegionCode.UZ))
912 alphaNumericNumber, RegionCode.AU));
918 alphaNumericNumber, RegionCode.AU));
924 alphaNumericNumber, RegionCode.AU));
930 alphaNumericNumber, RegionCode.AU));
936 alphaNumericNumber, RegionCode.US));
941 alphaNumericNumber, RegionCode.BS));
949 alphaNumericNumber, RegionCode.DE));
959 alphaNumericNumber, RegionCode.AU));
965 alphaNumericNumber, RegionCode.AU));
974 alphaNumericNumber, RegionCode.AU));
982 alphaNumericNumber, RegionCode.AU));
988 alphaNumericNumber, RegionCode.SG));
993 alphaNumericNumber, RegionCode.AQ));
1003 alphaNumericNumber, RegionCode.DE));
1013 alphaNumericNumber, RegionCode.DE));
1023 alphaNumericNumber, RegionCode.AQ));
1108 phoneUtil.formatNumberForMobileDialing(DE_NUMBER, RegionCode.DE, false));
1111 phoneUtil.formatNumberForMobileDialing(DE_NUMBER, RegionCode.CH, false));
1117 deNumberWithExtn, RegionCode.DE, false));
1121 deNumberWithExtn, RegionCode.CH, false));
1128 phoneUtil.formatNumberForMobileDialing(US_TOLLFREE, RegionCode.US, true));
1131 phoneUtil.formatNumberForMobileDialing(US_TOLLFREE, RegionCode.CN, true));
1134 phoneUtil.formatNumberForMobileDialing(US_NUMBER, RegionCode.US, true));
1141 usNumberWithExtn, RegionCode.US, true));
1146 US_TOLLFREE, RegionCode.US, false));
1150 US_TOLLFREE, RegionCode.CN, false));
1153 phoneUtil.formatNumberForMobileDialing(US_NUMBER, RegionCode.US, false));
1157 usNumberWithExtn, RegionCode.US, false));
1163 US_LONG_NUMBER, RegionCode.US, false));
1167 US_LONG_NUMBER, RegionCode.US, true));
1174 JP_STAR_NUMBER, RegionCode.JP, false));
1178 JP_STAR_NUMBER, RegionCode.JP, true));
1183 INTERNATIONAL_TOLL_FREE, RegionCode.JP, false));
1187 INTERNATIONAL_TOLL_FREE, RegionCode.JP, true));
1193 phoneUtil.formatNumberForMobileDialing(AE_UAN, RegionCode.JP, false));
1196 phoneUtil.formatNumberForMobileDialing(AE_UAN, RegionCode.AE, false));
1200 phoneUtil.formatNumberForMobileDialing(MX_NUMBER1, RegionCode.MX, false));
1203 phoneUtil.formatNumberForMobileDialing(MX_NUMBER1, RegionCode.US, false));
1211 UZ_FIXED_LINE, RegionCode.UZ, false));
1215 phoneUtil.formatNumberForMobileDialing(UZ_MOBILE, RegionCode.UZ, false));
1218 phoneUtil.formatNumberForMobileDialing(UZ_MOBILE, RegionCode.US, false));
1224 INTERNATIONAL_TOLL_FREE, RegionCode.US, false));
1228 INTERNATIONAL_TOLL_FREE, RegionCode.UN001, false));
1238 deShortNumber, RegionCode.DE, false));
1242 deShortNumber, RegionCode.IT, false));
1249 phoneUtil.formatNumberForMobileDialing(US_NUMBER, RegionCode.US, false));
1252 phoneUtil.formatNumberForMobileDialing(US_NUMBER, RegionCode.CA, false));
1255 phoneUtil.formatNumberForMobileDialing(US_NUMBER, RegionCode.BR, false));
1262 usShortNumber, RegionCode.US, false));
1266 usShortNumber, RegionCode.CA, false));
1270 usShortNumber, RegionCode.BR, false));
1281 auShortNumber, RegionCode.AU, false));
1285 auShortNumber, RegionCode.NZ, false));
1378 var number1 = phoneUtil.parseAndKeepRawInput('+442087654321', RegionCode.GB);
1381 phoneUtil.formatInOriginalFormat(number1, RegionCode.GB));
1384 var number2 = phoneUtil.parseAndKeepRawInput('02087654321', RegionCode.GB);
1387 phoneUtil.formatInOriginalFormat(number2, RegionCode.GB));
1391 phoneUtil.parseAndKeepRawInput('011442087654321', RegionCode.US);
1394 phoneUtil.formatInOriginalFormat(number3, RegionCode.US));
1397 var number4 = phoneUtil.parseAndKeepRawInput('442087654321', RegionCode.GB);
1400 phoneUtil.formatInOriginalFormat(number4, RegionCode.GB));
1403 var number5 = phoneUtil.parse('+442087654321', RegionCode.GB);
1406 phoneUtil.formatInOriginalFormat(number5, RegionCode.GB));
1412 var number6 = phoneUtil.parseAndKeepRawInput('7345678901', RegionCode.US);
1414 '734 567 8901', phoneUtil.formatInOriginalFormat(number6, RegionCode.US));
1419 var number7 = phoneUtil.parseAndKeepRawInput('0734567 8901', RegionCode.US);
1421 '0734567 8901', phoneUtil.formatInOriginalFormat(number7, RegionCode.US));
1426 var number8 = phoneUtil.parseAndKeepRawInput('02-4567-8900', RegionCode.KR);
1428 '02-4567-8900', phoneUtil.formatInOriginalFormat(number8, RegionCode.KR));
1431 var number9 = phoneUtil.parseAndKeepRawInput('01180012345678', RegionCode.US);
1434 phoneUtil.formatInOriginalFormat(number9, RegionCode.US));
1437 var number10 = phoneUtil.parseAndKeepRawInput('+80012345678', RegionCode.KR);
1440 phoneUtil.formatInOriginalFormat(number10, RegionCode.KR));
1445 var localNumberUS = phoneUtil.parseAndKeepRawInput('2530000', RegionCode.US);
1448 phoneUtil.formatInOriginalFormat(localNumberUS, RegionCode.US));
1452 phoneUtil.parseAndKeepRawInput('18003456789', RegionCode.US);
1456 numberWithNationalPrefixUS, RegionCode.US));
1460 phoneUtil.parseAndKeepRawInput('2087654321', RegionCode.GB);
1464 numberWithoutNationalPrefixGB, RegionCode.GB));
1469 phoneUtil.formatInOriginalFormat(number5, RegionCode.GB));
1473 phoneUtil.parseAndKeepRawInput('013312345678', RegionCode.MX);
1477 numberWithNationalPrefixMX, RegionCode.MX));
1481 phoneUtil.parseAndKeepRawInput('3312345678', RegionCode.MX);
1485 numberWithoutNationalPrefixMX, RegionCode.MX));
1489 phoneUtil.parseAndKeepRawInput('0212345678', RegionCode.IT);
1492 phoneUtil.formatInOriginalFormat(italianFixedLineNumber, RegionCode.IT));
1496 phoneUtil.parseAndKeepRawInput('00777012', RegionCode.JP);
1500 numberWithNationalPrefixJP, RegionCode.JP));
1504 phoneUtil.parseAndKeepRawInput('0777012', RegionCode.JP);
1508 numberWithoutNationalPrefixJP, RegionCode.JP));
1512 phoneUtil.parseAndKeepRawInput('012 3121286979', RegionCode.BR);
1515 phoneUtil.formatInOriginalFormat(numberWithCarrierCodeBR, RegionCode.BR));
1522 phoneUtil.parseAndKeepRawInput('044(33)1234-5678', RegionCode.MX);
1526 numberWithNationalPrefixMX1, RegionCode.MX));
1530 phoneUtil.parseAndKeepRawInput('045(33)1234-5678', RegionCode.MX);
1534 numberWithNationalPrefixMX2, RegionCode.MX));
1541 phoneUtil.parseAndKeepRawInput('0012 16502530000', RegionCode.AU);
1545 outOfCountryNumberFromAU1, RegionCode.AU));
1549 phoneUtil.parseAndKeepRawInput('0011 16502530000', RegionCode.AU);
1553 outOfCountryNumberFromAU2, RegionCode.AU));
1558 var starNumber = phoneUtil.parseAndKeepRawInput('*1234', RegionCode.JP);
1560 '*1234', phoneUtil.formatInOriginalFormat(starNumber, RegionCode.JP));
1562 var numberWithoutStar = phoneUtil.parseAndKeepRawInput('1234', RegionCode.JP);
1565 phoneUtil.formatInOriginalFormat(numberWithoutStar, RegionCode.JP));
1571 phoneUtil.formatInOriginalFormat(US_SHORT_BY_ONE_NUMBER, RegionCode.US));
1714 assertTrue(phoneUtil.isValidNumberForRegion(BS_NUMBER, RegionCode.BS));
1715 assertFalse(phoneUtil.isValidNumberForRegion(BS_NUMBER, RegionCode.US));
1729 assertTrue(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.RE));
1730 assertFalse(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.YT));
1733 assertTrue(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.YT));
1734 assertFalse(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.RE));
1737 assertFalse(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.YT));
1738 assertFalse(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.RE));
1742 assertEquals(RegionCode.YT, phoneUtil.getRegionCodeForNumber(reNumber));
1745 assertTrue(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.YT));
1746 assertTrue(phoneUtil.isValidNumberForRegion(reNumber, RegionCode.RE));
1748 INTERNATIONAL_TOLL_FREE, RegionCode.UN001));
1750 phoneUtil.isValidNumberForRegion(INTERNATIONAL_TOLL_FREE, RegionCode.US));
1752 phoneUtil.isValidNumberForRegion(INTERNATIONAL_TOLL_FREE, RegionCode.ZZ));
1759 assertFalse(phoneUtil.isValidNumberForRegion(invalidNumber, RegionCode.ZZ));
1761 phoneUtil.isValidNumberForRegion(invalidNumber, RegionCode.UN001));
1764 phoneUtil.isValidNumberForRegion(invalidNumber, RegionCode.UN001));
1765 assertFalse(phoneUtil.isValidNumberForRegion(invalidNumber, RegionCode.ZZ));
1805 assertEquals(RegionCode.US, phoneUtil.getRegionCodeForCountryCode(1));
1806 assertEquals(RegionCode.GB, phoneUtil.getRegionCodeForCountryCode(44));
1807 assertEquals(RegionCode.DE, phoneUtil.getRegionCodeForCountryCode(49));
1808 assertEquals(RegionCode.UN001, phoneUtil.getRegionCodeForCountryCode(800));
1809 assertEquals(RegionCode.UN001, phoneUtil.getRegionCodeForCountryCode(979));
1813 assertEquals(RegionCode.BS, phoneUtil.getRegionCodeForNumber(BS_NUMBER));
1814 assertEquals(RegionCode.US, phoneUtil.getRegionCodeForNumber(US_NUMBER));
1815 assertEquals(RegionCode.GB, phoneUtil.getRegionCodeForNumber(GB_MOBILE));
1817 RegionCode.UN001,
1820 RegionCode.UN001,
1827 assertTrue(regionCodesForNANPA.includes(RegionCode.US));
1828 assertTrue(regionCodesForNANPA.includes(RegionCode.BS));
1830 phoneUtil.getRegionCodesForCountryCode(44).includes(RegionCode.GB));
1832 phoneUtil.getRegionCodesForCountryCode(49).includes(RegionCode.DE));
1834 phoneUtil.getRegionCodesForCountryCode(800).includes(RegionCode.UN001));
1840 assertEquals(1, phoneUtil.getCountryCodeForRegion(RegionCode.US));
1841 assertEquals(64, phoneUtil.getCountryCodeForRegion(RegionCode.NZ));
1843 assertEquals(0, phoneUtil.getCountryCodeForRegion(RegionCode.ZZ));
1844 assertEquals(0, phoneUtil.getCountryCodeForRegion(RegionCode.UN001));
1846 assertEquals(0, phoneUtil.getCountryCodeForRegion(RegionCode.CS));
1850 assertEquals('1', phoneUtil.getNddPrefixForRegion(RegionCode.US, false));
1853 assertEquals('1', phoneUtil.getNddPrefixForRegion(RegionCode.BS, false));
1854 assertEquals('0', phoneUtil.getNddPrefixForRegion(RegionCode.NZ, false));
1856 assertEquals('0~0', phoneUtil.getNddPrefixForRegion(RegionCode.AO, false));
1857 assertEquals('00', phoneUtil.getNddPrefixForRegion(RegionCode.AO, true));
1860 assertNull(phoneUtil.getNddPrefixForRegion(RegionCode.ZZ, false));
1861 assertNull(phoneUtil.getNddPrefixForRegion(RegionCode.UN001, false));
1863 assertNull(phoneUtil.getNddPrefixForRegion(RegionCode.CS, false));
1867 assertTrue(phoneUtil.isNANPACountry(RegionCode.US));
1868 assertTrue(phoneUtil.isNANPACountry(RegionCode.BS));
1869 assertFalse(phoneUtil.isNANPACountry(RegionCode.DE));
1870 assertFalse(phoneUtil.isNANPACountry(RegionCode.ZZ));
1871 assertFalse(phoneUtil.isNANPACountry(RegionCode.UN001));
1882 phoneUtil.isPossibleNumberString('+1 650 253 0000', RegionCode.US));
1884 phoneUtil.isPossibleNumberString('+1 650 GOO OGLE', RegionCode.US));
1885 assertTrue(phoneUtil.isPossibleNumberString('(650) 253-0000', RegionCode.US));
1886 assertTrue(phoneUtil.isPossibleNumberString('253-0000', RegionCode.US));
1888 phoneUtil.isPossibleNumberString('+1 650 253 0000', RegionCode.GB));
1890 phoneUtil.isPossibleNumberString('+44 20 7031 3000', RegionCode.GB));
1892 phoneUtil.isPossibleNumberString('(020) 7031 3000', RegionCode.GB));
1893 assertTrue(phoneUtil.isPossibleNumberString('7031 3000', RegionCode.GB));
1894 assertTrue(phoneUtil.isPossibleNumberString('3331 6005', RegionCode.NZ));
1896 phoneUtil.isPossibleNumberString('+800 1234 5678', RegionCode.UN001));
2312 phoneUtil.isPossibleNumberString('+1 650 253 00000', RegionCode.US));
2314 phoneUtil.isPossibleNumberString('(650) 253-00000', RegionCode.US));
2316 phoneUtil.isPossibleNumberString('I want a Pizza', RegionCode.US));
2317 assertFalse(phoneUtil.isPossibleNumberString('253-000', RegionCode.US));
2318 assertFalse(phoneUtil.isPossibleNumberString('1 3000', RegionCode.GB));
2319 assertFalse(phoneUtil.isPossibleNumberString('+44 300', RegionCode.GB));
2321 phoneUtil.isPossibleNumberString('+800 1234 5678 9', RegionCode.UN001));
2597 var metadata = phoneUtil.getMetadataForRegion(RegionCode.US);
2758 assertTrue(NZ_NUMBER.equals(phoneUtil.parse('033316005', RegionCode.NZ)));
2766 assertTrue(NZ_NUMBER.equals(phoneUtil.parse('33316005', RegionCode.NZ)));
2768 assertTrue(NZ_NUMBER.equals(phoneUtil.parse('03-331 6005', RegionCode.NZ)));
2769 assertTrue(NZ_NUMBER.equals(phoneUtil.parse('03 331 6005', RegionCode.NZ)));
2772 phoneUtil.parse('tel:03-331-6005;phone-context=+64', RegionCode.NZ)));
2774 phoneUtil.parse('tel:331-6005;phone-context=+64-3', RegionCode.NZ)));
2776 phoneUtil.parse('tel:331-6005;phone-context=+64-3', RegionCode.US)));
2778 'My number is tel:03-331-6005;phone-context=+64', RegionCode.NZ)));
2782 'tel:03-331-6005;phone-context=+64;a=%A1', RegionCode.NZ)));
2785 'tel:03-331-6005;isub=12345;phone-context=+64', RegionCode.NZ)));
2787 phoneUtil.parse('tel:+64-3-331-6005;isub=12345', RegionCode.NZ)));
2790 phoneUtil.parse('03-331-6005;phone-context=+64', RegionCode.NZ)));
2794 NZ_NUMBER.equals(phoneUtil.parse('0064 3 331 6005', RegionCode.NZ)));
2798 NZ_NUMBER.equals(phoneUtil.parse('01164 3 331 6005', RegionCode.US)));
2800 NZ_NUMBER.equals(phoneUtil.parse('+64 3 331 6005', RegionCode.US)));
2804 NZ_NUMBER.equals(phoneUtil.parse('+01164 3 331 6005', RegionCode.US)));
2806 NZ_NUMBER.equals(phoneUtil.parse('+0064 3 331 6005', RegionCode.NZ)));
2808 NZ_NUMBER.equals(phoneUtil.parse('+ 00 64 3 331 6005', RegionCode.NZ)));
2811 'tel:253-0000;phone-context=www.google.com', RegionCode.US)));
2813 'tel:253-0000;isub=12345;phone-context=www.google.com', RegionCode.US)));
2818 'tel:2530000;isub=12345;phone-context=1-650', RegionCode.US)));
2820 'tel:2530000;isub=12345;phone-context=1234.com', RegionCode.US)));
2826 assertTrue(nzNumber.equals(phoneUtil.parse('64(0)64123456', RegionCode.NZ)));
2828 assertTrue(DE_NUMBER.equals(phoneUtil.parse('301/23456', RegionCode.DE)));
2836 assertTrue(usNumber.equals(phoneUtil.parse('123-456-7890', RegionCode.US)));
2841 JP_STAR_NUMBER.equals(phoneUtil.parse('+81 *2345', RegionCode.JP)));
2847 assertTrue(shortNumber.equals(phoneUtil.parse('12', RegionCode.NZ)));
2856 assertTrue(shortNumber.equals(phoneUtil.parse('0123456', RegionCode.GB)));
2866 tollfreeNumber.equals(phoneUtil.parse('0800 DDA 005', RegionCode.NZ)));
2872 premiumNumber.equals(phoneUtil.parse('0900 DDA 6005', RegionCode.NZ)));
2876 premiumNumber.equals(phoneUtil.parse('0900 332 6005a', RegionCode.NZ)));
2878 premiumNumber.equals(phoneUtil.parse('0900 332 600a5', RegionCode.NZ)));
2880 premiumNumber.equals(phoneUtil.parse('0900 332 600A5', RegionCode.NZ)));
2882 premiumNumber.equals(phoneUtil.parse('0900 a332 600A5', RegionCode.NZ)));
2894 phoneUtil.parse(maliciousNumber.toString(), RegionCode.US);
2911 phoneUtil.parse(maliciousNumberWithAlmostExt.toString(), RegionCode.US);
2925 US_NUMBER.equals(phoneUtil.parse('+1 (650) 253-0000', RegionCode.NZ)));
2927 phoneUtil.parse('011 800 1234 5678', RegionCode.US)));
2929 US_NUMBER.equals(phoneUtil.parse('1-650-253-0000', RegionCode.US)));
2933 US_NUMBER.equals(phoneUtil.parse('0011-650-253-0000', RegionCode.SG)));
2936 US_NUMBER.equals(phoneUtil.parse('0081-650-253-0000', RegionCode.SG)));
2939 US_NUMBER.equals(phoneUtil.parse('0191-650-253-0000', RegionCode.SG)));
2942 US_NUMBER.equals(phoneUtil.parse('0~01-650-253-0000', RegionCode.PL)));
2945 US_NUMBER.equals(phoneUtil.parse('++1 (650) 253-0000', RegionCode.PL)));
2951 phoneUtil.parse('\uFF0B1 (650) 253-0000', RegionCode.SG)));
2954 phoneUtil.parse('1 (650) 253\u00AD-0000', RegionCode.US)));
2960 RegionCode.SG)));
2965 RegionCode.SG)));
2977 IT_NUMBER.equals(phoneUtil.parse('+39 02-36618 300', RegionCode.NZ)));
2978 assertTrue(IT_NUMBER.equals(phoneUtil.parse('02-36618 300', RegionCode.IT)));
2980 assertTrue(IT_MOBILE.equals(phoneUtil.parse('345 678 901', RegionCode.IT)));
2990 arNumber.equals(phoneUtil.parse('+54 9 343 555 1212', RegionCode.AR)));
2992 arNumber.equals(phoneUtil.parse('0343 15 555 1212', RegionCode.AR)));
2998 arNumber.equals(phoneUtil.parse('+54 9 3715 65 4320', RegionCode.AR)));
3000 arNumber.equals(phoneUtil.parse('03715 15 65 4320', RegionCode.AR)));
3001 assertTrue(AR_MOBILE.equals(phoneUtil.parse('911 876 54321', RegionCode.AR)));
3005 AR_NUMBER.equals(phoneUtil.parse('+54 11 8765 4321', RegionCode.AR)));
3006 assertTrue(AR_NUMBER.equals(phoneUtil.parse('011 8765 4321', RegionCode.AR)));
3012 arNumber.equals(phoneUtil.parse('+54 3715 65 4321', RegionCode.AR)));
3013 assertTrue(arNumber.equals(phoneUtil.parse('03715 65 4321', RegionCode.AR)));
3019 arNumber.equals(phoneUtil.parse('+54 23 1234 0000', RegionCode.AR)));
3020 assertTrue(arNumber.equals(phoneUtil.parse('023 1234 0000', RegionCode.AR)));
3026 assertTrue(AR_NUMBER.equals(phoneUtil.parse('01187654321', RegionCode.AR)));
3028 AR_NUMBER.equals(phoneUtil.parse('(0) 1187654321', RegionCode.AR)));
3029 assertTrue(AR_NUMBER.equals(phoneUtil.parse('0 1187654321', RegionCode.AR)));
3031 AR_NUMBER.equals(phoneUtil.parse('(0xx) 1187654321', RegionCode.AR)));
3042 arFromUs.equals(phoneUtil.parse('011xx5481429712', RegionCode.US)));
3052 mxNumber.equals(phoneUtil.parse('+52 (449)978-0001', RegionCode.MX)));
3054 mxNumber.equals(phoneUtil.parse('01 (449)978-0001', RegionCode.MX)));
3055 assertTrue(mxNumber.equals(phoneUtil.parse('(449)978-0001', RegionCode.MX)));
3062 mxNumber.equals(phoneUtil.parse('+52 1 33 1234-5678', RegionCode.MX)));
3064 mxNumber.equals(phoneUtil.parse('044 (33) 1234-5678', RegionCode.MX)));
3066 mxNumber.equals(phoneUtil.parse('045 33 1234-5678', RegionCode.MX)));
3073 phoneUtil.parse(sentencePhoneNumber, RegionCode.NZ);
3085 phoneUtil.parse(sentencePhoneNumber, RegionCode.NZ);
3097 phoneUtil.parse(sentencePhoneNumber, RegionCode.NZ);
3109 phoneUtil.parse(sentencePhoneNumber, RegionCode.NZ);
3122 phoneUtil.parse(tooLongPhoneNumber, RegionCode.GB);
3135 phoneUtil.parse(plusMinusPhoneNumber, RegionCode.DE);
3148 phoneUtil.parse(plusStar, RegionCode.DE);
3159 phoneUtil.parse(plusStarPhoneNumber, RegionCode.DE);
3172 phoneUtil.parse(tooShortPhoneNumber, RegionCode.DE);
3185 phoneUtil.parse(invalidCountryCode, RegionCode.NZ);
3198 phoneUtil.parse(plusAndIddAndInvalidCountryCode, RegionCode.NZ);
3210 phoneUtil.parse(someNumber, RegionCode.ZZ);
3220 phoneUtil.parse(someNumber, RegionCode.CS);
3240 phoneUtil.parse(someNumber, RegionCode.GB);
3250 phoneUtil.parse(someNumber, RegionCode.GB);
3260 phoneUtil.parse(someNumber, RegionCode.US);
3270 phoneUtil.parse(someNumber, RegionCode.US);
3282 phoneUtil.parse(emptyNumber, RegionCode.ZZ);
3292 phoneUtil.parse(null, RegionCode.ZZ);
3301 phoneUtil.parse(null, RegionCode.US);
3312 phoneUtil.parse(domainRfcPhoneContext, RegionCode.ZZ);
3325 phoneUtil.parse(invalidRfcPhoneContext, RegionCode.ZZ);
3336 phoneUtil.parse(invalidRfcPhoneContext, RegionCode.ZZ);
3352 NZ_NUMBER.equals(phoneUtil.parse('+64 3 331 6005', RegionCode.ZZ)));
3355 NZ_NUMBER.equals(phoneUtil.parse('\uFF0B64 3 331 6005', RegionCode.ZZ)));
3358 NZ_NUMBER.equals(phoneUtil.parse('Tel: +64 3 331 6005', RegionCode.ZZ)));
3367 phoneUtil.parse('tel:03-331-6005;phone-context=+64', RegionCode.ZZ)));
3369 phoneUtil.parse(' tel:03-331-6005;phone-context=+64', RegionCode.ZZ)));
3371 'tel:03-331-6005;isub=12345;phone-context=+64', RegionCode.ZZ)));
3380 phoneUtil.parseAndKeepRawInput('+64 3 331 6005', RegionCode.ZZ)));
3394 assertTrue(byNumber.equals(phoneUtil.parse('8123', RegionCode.BY)));
3396 assertTrue(byNumber.equals(phoneUtil.parse('81234', RegionCode.BY)));
3401 assertTrue(byNumber.equals(phoneUtil.parse('812345', RegionCode.BY)));
3405 assertTrue(byNumber.equals(phoneUtil.parse('8123456', RegionCode.BY)));
3415 nzNumber.equals(phoneUtil.parse('03 331 6005 ext 3456', RegionCode.NZ)));
3417 nzNumber.equals(phoneUtil.parse('03-3316005x3456', RegionCode.NZ)));
3419 nzNumber.equals(phoneUtil.parse('03-3316005 int.3456', RegionCode.NZ)));
3421 nzNumber.equals(phoneUtil.parse('03 3316005 #3456', RegionCode.NZ)));
3425 phoneUtil.parse('1800 six-flags', RegionCode.US)));
3427 phoneUtil.parse('1800 SIX FLAGS', RegionCode.US)));
3429 phoneUtil.parse('0~0 1800 7493 5247', RegionCode.PL)));
3431 phoneUtil.parse('(1800) 7493.5247', RegionCode.US)));
3438 phoneUtil.parse('0~0 1800 7493 5247 ~1234', RegionCode.PL)));
3449 ukNumber.equals(phoneUtil.parse('+44 2034567890x456', RegionCode.NZ)));
3451 ukNumber.equals(phoneUtil.parse('+44 2034567890x456', RegionCode.GB)));
3453 ukNumber.equals(phoneUtil.parse('+44 2034567890 x456', RegionCode.GB)));
3455 ukNumber.equals(phoneUtil.parse('+44 2034567890 X456', RegionCode.GB)));
3457 ukNumber.equals(phoneUtil.parse('+44 2034567890 X 456', RegionCode.GB)));
3459 ukNumber.equals(phoneUtil.parse('+44 2034567890 X 456', RegionCode.GB)));
3461 phoneUtil.parse('+44 2034567890 x 456 ', RegionCode.GB)));
3463 ukNumber.equals(phoneUtil.parse('+44 2034567890 X 456', RegionCode.GB)));
3465 phoneUtil.parse('+44-2034567890;ext=456', RegionCode.GB)));
3467 'tel:2034567890;ext=456;phone-context=+44', RegionCode.ZZ)));
3470 '+442034567890\uFF45\uFF58\uFF54\uFF4E456', RegionCode.GB)));
3473 phoneUtil.parse('+442034567890\uFF58\uFF54\uFF4E456', RegionCode.GB)));
3476 phoneUtil.parse('+442034567890\uFF58\uFF54456', RegionCode.GB)));
3484 phoneUtil.parse('(800) 901-3355 x 7246433', RegionCode.US)));
3486 phoneUtil.parse('(800) 901-3355 , ext 7246433', RegionCode.US)));
3488 phoneUtil.parse('(800) 901-3355 ; 7246433', RegionCode.US)));
3491 phoneUtil.parse('(800) 901-3355;7246433', RegionCode.US)));
3493 phoneUtil.parse('(800) 901-3355 ,extension 7246433', RegionCode.US)));
3495 '(800) 901-3355 ,extensi\u00F3n 7246433', RegionCode.US)));
3499 '(800) 901-3355 ,extensio\u0301n 7246433', RegionCode.US)));
3501 phoneUtil.parse('(800) 901-3355 , 7246433', RegionCode.US)));
3503 phoneUtil.parse('(800) 901-3355 ext: 7246433', RegionCode.US)));
3510 phoneUtil.parse('8 (423) 202-25-11, доб. 100', RegionCode.RU)));
3512 phoneUtil.parse('8 (423) 202-25-11 доб. 100', RegionCode.RU)));
3514 phoneUtil.parse('8 (423) 202-25-11, доб 100', RegionCode.RU)));
3516 phoneUtil.parse('8 (423) 202-25-11 доб 100', RegionCode.RU)));
3518 phoneUtil.parse('8 (423) 202-25-11доб100', RegionCode.RU)));
3521 '8 (423) 202-25-11, \u0434\u043E\u0431. 100', RegionCode.RU)));
3524 phoneUtil.parse('8 (423) 202-25-11ДОБ100', RegionCode.RU)));
3526 '8 (423) 202-25-11\u0414\u041E\u0411100', RegionCode.RU)));
3535 phoneUtil.parse('(212)123-1234 x508/x1234', RegionCode.US)));
3537 phoneUtil.parse('(212)123-1234 x508/ x1234', RegionCode.US)));
3539 phoneUtil.parse('(212)123-1234 x508\\x1234', RegionCode.US)));
3548 phoneUtil.parse('+1 (645) 123 1234-910#', RegionCode.US)));
3551 phoneUtil.parse('+1 (645) 123 1234 ext. 910#', RegionCode.US)));
3564 phoneUtil.parse('tel:+6433316005;ext=0', RegionCode.NZ)));
3567 phoneUtil.parse('tel:+6433316005;ext=01234567890123456789', RegionCode.NZ)));
3570 phoneUtil.parse('tel:+6433316005;ext=012345678901234567890', RegionCode.NZ);
3584 phoneUtil.parse('03 3316005ext:1', RegionCode.NZ)));
3587 phoneUtil.parse('03 3316005 xtn:12345678901234567890', RegionCode.NZ)));
3589 phoneUtil.parse('03 3316005 extension\t12345678901234567890', RegionCode.NZ)));
3591 phoneUtil.parse('03 3316005 xtensio:12345678901234567890', RegionCode.NZ)));
3593 phoneUtil.parse('03 3316005 xtensión, 12345678901234567890#', RegionCode.NZ)));
3595 phoneUtil.parse('03 3316005extension.12345678901234567890', RegionCode.NZ)));
3597 phoneUtil.parse('03 3316005 доб:12345678901234567890', RegionCode.NZ)));
3600 phoneUtil.parse('03 3316005 extension 123456789012345678901', RegionCode.NZ);
3620 phoneUtil.parse('+12679000000,,123456789012345#', RegionCode.US)));
3622 phoneUtil.parse('+12679000000;123456789012345#', RegionCode.US)));
3628 phoneUtil.parse('+442034000000,,123456789#', RegionCode.GB)));
3631 phoneUtil.parse('+12679000000,,1234567890123456#', RegionCode.US);
3652 phoneUtil.parse('03 3316005 x 123456789', RegionCode.NZ)));
3654 phoneUtil.parse('03 3316005 x. 123456789', RegionCode.NZ)));
3656 phoneUtil.parse('03 3316005 #123456789#', RegionCode.NZ)));
3658 phoneUtil.parse('03 3316005 ~ 123456789', RegionCode.NZ)));
3661 phoneUtil.parse("03 3316005 ~ 1234567890", RegionCode.NZ);
3681 phoneUtil.parse('+1123-456-7890 666666#', RegionCode.US)));
3684 phoneUtil.parse('+11234567890-6#', RegionCode.US)));
3687 phoneUtil.parse('+1123-456-7890 7777777#', RegionCode.US);
3706 phoneUtil.parseAndKeepRawInput('800 six-flags', RegionCode.US)));
3715 phoneUtil.parseAndKeepRawInput('1800 six-flag', RegionCode.US)));
3720 phoneUtil.parseAndKeepRawInput('+1800 six-flag', RegionCode.NZ)));
3727 phoneUtil.parseAndKeepRawInput('001800 six-flag', RegionCode.NZ)));
3731 phoneUtil.parseAndKeepRawInput('123 456 7890', RegionCode.CS);
3748 phoneUtil.parseAndKeepRawInput('08122123456', RegionCode.KR)));
3758 assertTrue(oneZero.equals(phoneUtil.parse('011', RegionCode.AU)));
3767 assertTrue(twoZeros.equals(phoneUtil.parse('001', RegionCode.AU)));
3776 assertTrue(stillTwoZeros.equals(phoneUtil.parse('000', RegionCode.AU)));
3785 assertTrue(threeZeros.equals(phoneUtil.parse('0000', RegionCode.AU)));
3806 phoneUtil.formatOutOfCountryCallingNumber(US_NUMBER, RegionCode.AD));
3823 var num1 = phoneUtil.parse('+64 3 331 6005', RegionCode.NZ);
3825 var num2 = phoneUtil.parse('+64 03 331 6005', RegionCode.NZ);