Home
last modified time | relevance | path

Searched refs:RegionCode (Results 1 – 18 of 18) sorted by relevance

/third_party/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/
DShortNumberInfoTest.java34 shortInfo.isPossibleShortNumberForRegion(parse("123456", RegionCode.FR), RegionCode.FR)); in testIsPossibleShortNumber()
49 assertTrue(shortInfo.isValidShortNumberForRegion(parse("1010", RegionCode.FR), RegionCode.FR)); in testIsValidShortNumber()
53 shortInfo.isValidShortNumberForRegion(parse("123456", RegionCode.FR), RegionCode.FR)); in testIsValidShortNumber()
65 shortInfo.isCarrierSpecificForRegion(parse("33669", RegionCode.US), RegionCode.US)); in testIsCarrierSpecific()
71 shortInfo.isCarrierSpecificForRegion(parse("911", RegionCode.US), RegionCode.US)); in testIsCarrierSpecific()
77 shortInfo.isCarrierSpecificForRegion(carrierSpecificNumberForSomeRegion, RegionCode.US)); in testIsCarrierSpecific()
79 shortInfo.isCarrierSpecificForRegion(carrierSpecificNumberForSomeRegion, RegionCode.BB)); in testIsCarrierSpecific()
85 assertTrue(shortInfo.isSmsServiceForRegion(smsServiceNumberForSomeRegion, RegionCode.US)); in testIsSmsService()
86 assertFalse(shortInfo.isSmsServiceForRegion(smsServiceNumberForSomeRegion, RegionCode.BB)); in testIsSmsService()
90 String premiumRateExample = shortInfo.getExampleShortNumberForCost(RegionCode.FR, in testGetExpectedCost()
[all …]
DPhoneNumberMatcherTest.java83 doTestFindInContext("033316005", RegionCode.NZ); in testFindNationalNumber()
87 doTestFindInContext("03-331 6005", RegionCode.NZ); in testFindNationalNumber()
88 doTestFindInContext("03 331 6005", RegionCode.NZ); in testFindNationalNumber()
91 doTestFindInContext("0064 3 331 6005", RegionCode.NZ); in testFindNationalNumber()
94 doTestFindInContext("01164 3 331 6005", RegionCode.US); in testFindNationalNumber()
95 doTestFindInContext("+64 3 331 6005", RegionCode.US); in testFindNationalNumber()
97 doTestFindInContext("64(0)64123456", RegionCode.NZ); in testFindNationalNumber()
100 doTestFindInContext("0123/456789", RegionCode.PL); in testFindNationalNumber()
101 doTestFindInContext("123-456-7890", RegionCode.US); in testFindNationalNumber()
106 doTestFindInContext("+1 (650) 333-6000", RegionCode.NZ); in testFindWithInternationalPrefixes()
[all …]
DPhoneNumberUtilTest.java143 assertEquals(RegionCode.UN001, phoneUtil.getRegionCodeForCountryCode(callingCode)); in testGetSupportedGlobalNetworkCallingCodes()
152 assertTrue(phoneUtil.getRegionCodeForCountryCode(callingCode) != RegionCode.ZZ); in testGetSupportedCallingCodes()
166 assertTrue(phoneUtil.getSupportedTypesForRegion(RegionCode.BR) in testGetSupportedTypesForRegion()
169 assertFalse(phoneUtil.getSupportedTypesForRegion(RegionCode.BR) in testGetSupportedTypesForRegion()
172 assertFalse(phoneUtil.getSupportedTypesForRegion(RegionCode.BR) in testGetSupportedTypesForRegion()
176 assertTrue(phoneUtil.getSupportedTypesForRegion(RegionCode.US) in testGetSupportedTypesForRegion()
178 assertTrue(phoneUtil.getSupportedTypesForRegion(RegionCode.US) in testGetSupportedTypesForRegion()
180 assertFalse(phoneUtil.getSupportedTypesForRegion(RegionCode.US) in testGetSupportedTypesForRegion()
184 assertEquals(0, phoneUtil.getSupportedTypesForRegion(RegionCode.ZZ).size()); in testGetSupportedTypesForRegion()
198 PhoneMetadata metadata = phoneUtil.getMetadataForRegion(RegionCode.US); in testGetInstanceLoadUSMetadata()
[all …]
DAsYouTypeFormatterTest.java30 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.ZZ); in testInvalidRegion()
52 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.ZZ); in testInvalidPlusSign()
72 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.ZZ); in testTooLongNumberMatchingMultipleLeadingDigits()
92 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.BY); in testCountryWithSpaceInNationalPrefixFormattingRule()
107 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.BY); in testCountryWithSpaceInNationalPrefixFormattingRuleAndLongNdd()
121 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFUS()
215 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFUSFullWidthCharacters()
229 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFUSMobileShortCode()
238 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFUSVanityNumber()
254 AsYouTypeFormatter formatter = phoneUtil.getAsYouTypeFormatter(RegionCode.US); in testAYTFAndRememberPositionUS()
[all …]
DRegionCode.java22 final class RegionCode { class
/third_party/libphonenumber/javascript/i18n/phonenumbers/
Dshortnumberinfo_test.js45 var RegionCode = i18n.phonenumbers.RegionCode; variable
53 phoneUtil.parse('123456', RegionCode.FR), RegionCode.FR));
74 phoneUtil.parse('1010', RegionCode.FR), RegionCode.FR));
80 phoneUtil.parse('123456', RegionCode.FR), RegionCode.FR));
95 phoneUtil.parse('33669', RegionCode.US), RegionCode.US));
102 phoneUtil.parse('911', RegionCode.US), RegionCode.US));
109 carrierSpecificNumberForSomeRegion, RegionCode.US));
111 carrierSpecificNumberForSomeRegion, RegionCode.BB));
119 smsServiceNumberForSomeRegion, RegionCode.US));
121 smsServiceNumberForSomeRegion, RegionCode.BB));
[all …]
Dphonenumberutil_test.js263 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));
[all …]
Dasyoutypeformatter_test.js34 var RegionCode = i18n.phonenumbers.RegionCode; variable
38 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.ZZ);
61 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.ZZ);
82 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.ZZ);
103 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.BY);
119 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.BY);
134 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
229 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
244 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
254 var f = new i18n.phonenumbers.AsYouTypeFormatter(RegionCode.US);
[all …]
Dregioncodefortesting.js31 i18n.phonenumbers.RegionCode = {
/third_party/libphonenumber/cpp/test/phonenumbers/
Dshortnumberinfo_test.cc62 ParseNumberForTesting("123456", RegionCode::FR()), RegionCode::FR())); in TEST_F()
83 ParseNumberForTesting("1010", RegionCode::FR()), RegionCode::FR())); in TEST_F()
90 ParseNumberForTesting("123456", RegionCode::FR()), RegionCode::FR())); in TEST_F()
105 ParseNumberForTesting("33669", RegionCode::US()), RegionCode::US())); in TEST_F()
112 ParseNumberForTesting("911", RegionCode::US()), RegionCode::US())); in TEST_F()
120 carrier_specific_number_for_some_region, RegionCode::US())); in TEST_F()
122 carrier_specific_number_for_some_region, RegionCode::BB())); in TEST_F()
130 sms_service_number_for_some_region, RegionCode::US())); in TEST_F()
132 sms_service_number_for_some_region, RegionCode::BB())); in TEST_F()
139 RegionCode::FR(), ShortNumberInfo::PREMIUM_RATE); in TEST_F()
[all …]
Dphonenumbermatcher_test.cc75 RegionCode::US(), in PhoneNumberMatcherTest()
155 PhoneNumberMatcher matcher(phone_util_, sub, RegionCode::NZ(), in AssertEqualRange()
215 const string& region = RegionCode::US(); in FindMatchesInContexts()
394 DoTestFindInContext("033316005", RegionCode::NZ()); in TEST_F()
398 DoTestFindInContext("03-331 6005", RegionCode::NZ()); in TEST_F()
399 DoTestFindInContext("03 331 6005", RegionCode::NZ()); in TEST_F()
402 DoTestFindInContext("0064 3 331 6005", RegionCode::NZ()); in TEST_F()
405 DoTestFindInContext("01164 3 331 6005", RegionCode::US()); in TEST_F()
406 DoTestFindInContext("+64 3 331 6005", RegionCode::US()); in TEST_F()
408 DoTestFindInContext("64(0)64123456", RegionCode::NZ()); in TEST_F()
[all …]
Dphonenumberutil_test.cc139 phone_util_.Parse(input, RegionCode::GB(), &phone_number)); in TEST_F()
151 phone_util_.Parse(input, RegionCode::GB(), &phone_number)); in TEST_F()
172 EXPECT_EQ(RegionCode::UN001(), region_code); in TEST_F()
186 EXPECT_NE(RegionCode::ZZ(), region_code); in TEST_F()
201 phone_util_.GetSupportedTypesForRegion(RegionCode::BR(), &types); in TEST_F()
212 phone_util_.GetSupportedTypesForRegion(RegionCode::US(), &types); in TEST_F()
217 phone_util_.GetSupportedTypesForRegion(RegionCode::ZZ(), &types); in TEST_F()
239 EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::US()) in TEST_F()
241 EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::BS()) in TEST_F()
246 EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::GB()) in TEST_F()
[all …]
Dasyoutypeformatter_test.cc74 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US())); in TEST_F()
80 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::GetUnknown())); in TEST_F()
100 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::GetUnknown())); in TEST_F()
121 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::BY())); in TEST_F()
138 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::BY())); in TEST_F()
153 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US())); in TEST_F()
249 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US())); in TEST_F()
284 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US())); in TEST_F()
294 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US())); in TEST_F()
311 formatter_.reset(phone_util_.GetAsYouTypeFormatter(RegionCode::US())); in TEST_F()
[all …]
Dtest_util.h50 class RegionCode {
/third_party/libphonenumber/cpp/src/phonenumbers/
Dregion_code.h25 class RegionCode {
Dshortnumberinfo.cc173 if (region_codes.size() > 1 && region_code != RegionCode::GetUnknown()) { in IsValidShortNumber()
266 region_code->assign(RegionCode::GetUnknown()); in GetRegionCodeForShortNumberFromRegionList()
284 region_code->assign(RegionCode::GetUnknown()); in GetRegionCodeForShortNumberFromRegionList()
Dphonenumberutil.cc851 if (region_code == RegionCode::GetUnknown()) { in PhoneNumberUtil()
1869 region_codes.front() : RegionCode::GetUnknown(); in GetRegionCodeForCountryCode()
1881 *region_code = RegionCode::GetUnknown(); in GetRegionCodeForNumber()
1915 *region_code = RegionCode::GetUnknown(); in GetRegionCodeForNumberFromRegionList()
2047 RegionCode::GetUnknown(), number); in GetExampleNumberForType()
2081 RegionCode::GetUnknown(), number); in GetExampleNumberForNonGeoEntity()
2955 if (region_code != RegionCode::GetUnknown()) { in ExtractCountryCode()
3105 Parse(first_number, RegionCode::GetUnknown(), &first_number_as_proto); in IsNumberMatchWithTwoStrings()
3111 ErrorType error_type = Parse(second_number, RegionCode::GetUnknown(), in IsNumberMatchWithTwoStrings()
3117 error_type = ParseHelper(first_number, RegionCode::GetUnknown(), false, in IsNumberMatchWithTwoStrings()
[all …]
/third_party/libphonenumber/
Drelease_notes.txt1123 - Added isSmsServiceForRegion(PhoneNumber, RegionCode) API in C++ and Java