Changing the offline geocoder to not return any country at all if the number could belong to multiple countries. git-svn-id: http://libphonenumber.googlecode.com/svn/trunk/resources@701 ee073f10-1060-11df-b6a4-87a95322a99c
diff --git a/PhoneNumberMetadataForTesting.xml b/PhoneNumberMetadataForTesting.xml index 280373d..ae670ca 100644 --- a/PhoneNumberMetadataForTesting.xml +++ b/PhoneNumberMetadataForTesting.xml
@@ -223,8 +223,14 @@ <!-- Cocos Islands --> <!-- Country calling code shared with Australia. --> <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be - recognised by the library. --> + recognised by the library. However, we don't want all numbers to be considered valid for + it, so we set at least a general description that allows our test geocoding numbers to be + valid only for Australia. --> <territory id="CC" countryCode="61"> + <generalDesc> + <nationalNumberPattern>5\d{3,14}</nationalNumberPattern> + <possibleNumberPattern>\d{2,14}</possibleNumberPattern> + </generalDesc> </territory> <!-- China --> @@ -249,8 +255,14 @@ <!-- Christmas Islands --> <!-- Country calling code shared with Australia. --> <!-- This country is used to test ShortNumberInfo, so at least the country calling code must be - recognised by the library. --> + recognised by the library. However, we don't want all numbers to be considered valid for + it, so we set at least a general description that allows our test geocoding numbers to be + valid only for Australia. --> <territory id="CX" countryCode="61"> + <generalDesc> + <nationalNumberPattern>5\d{3,14}</nationalNumberPattern> + <possibleNumberPattern>\d{2,14}</possibleNumberPattern> + </generalDesc> </territory> <!-- Germany -->