phonelib 0.3.6 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1894) hide show
  1. checksums.yaml +8 -8
  2. data/README.rdoc +11 -0
  3. data/data/extended_data.dat +0 -0
  4. data/data/libphonenumber/AUTHORS +4 -0
  5. data/data/libphonenumber/CONTRIBUTORS +68 -0
  6. data/data/libphonenumber/LICENSE +176 -0
  7. data/data/libphonenumber/LICENSE.Chromium +37 -0
  8. data/data/libphonenumber/README.md +112 -0
  9. data/data/libphonenumber/codereview.settings +4 -0
  10. data/data/libphonenumber/cpp/CMakeLists.txt +573 -0
  11. data/data/libphonenumber/cpp/LICENSE +13 -0
  12. data/data/libphonenumber/cpp/README +284 -0
  13. data/data/libphonenumber/cpp/src/phonenumbers/alternate_format.cc +960 -0
  14. data/data/libphonenumber/cpp/src/phonenumbers/alternate_format.h +29 -0
  15. data/data/libphonenumber/cpp/src/phonenumbers/asyoutypeformatter.cc +774 -0
  16. data/data/libphonenumber/cpp/src/phonenumbers/asyoutypeformatter.h +243 -0
  17. data/data/libphonenumber/cpp/src/phonenumbers/base/basictypes.h +208 -0
  18. data/data/libphonenumber/cpp/src/phonenumbers/base/logging.h +41 -0
  19. data/data/libphonenumber/cpp/src/phonenumbers/base/memory/scoped_ptr.h +450 -0
  20. data/data/libphonenumber/cpp/src/phonenumbers/base/memory/singleton.h +95 -0
  21. data/data/libphonenumber/cpp/src/phonenumbers/base/memory/singleton_posix.h +53 -0
  22. data/data/libphonenumber/cpp/src/phonenumbers/base/strings/string_piece.cc +221 -0
  23. data/data/libphonenumber/cpp/src/phonenumbers/base/strings/string_piece.h +194 -0
  24. data/data/libphonenumber/cpp/src/phonenumbers/base/synchronization/lock.h +89 -0
  25. data/data/libphonenumber/cpp/src/phonenumbers/base/synchronization/lock_posix.h +63 -0
  26. data/data/libphonenumber/cpp/src/phonenumbers/base/template_util.h +108 -0
  27. data/data/libphonenumber/cpp/src/phonenumbers/base/thread_checker.h +70 -0
  28. data/data/libphonenumber/cpp/src/phonenumbers/callback.h +88 -0
  29. data/data/libphonenumber/cpp/src/phonenumbers/default_logger.cc +58 -0
  30. data/data/libphonenumber/cpp/src/phonenumbers/default_logger.h +105 -0
  31. data/data/libphonenumber/cpp/src/phonenumbers/encoding_utils.h +51 -0
  32. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/area_code_map.cc +94 -0
  33. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/area_code_map.h +75 -0
  34. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/default_map_storage.cc +65 -0
  35. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/default_map_storage.h +76 -0
  36. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/geocoding_data.h +77 -0
  37. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/mapping_file_provider.cc +175 -0
  38. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/mapping_file_provider.h +75 -0
  39. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/phonenumber_offline_geocoder.cc +216 -0
  40. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/phonenumber_offline_geocoder.h +165 -0
  41. data/data/libphonenumber/cpp/src/phonenumbers/lite_metadata.cc +11422 -0
  42. data/data/libphonenumber/cpp/src/phonenumbers/logger.cc +27 -0
  43. data/data/libphonenumber/cpp/src/phonenumbers/logger.h +103 -0
  44. data/data/libphonenumber/cpp/src/phonenumbers/matcher_api.h +54 -0
  45. data/data/libphonenumber/cpp/src/phonenumbers/metadata.cc +12330 -0
  46. data/data/libphonenumber/cpp/src/phonenumbers/metadata.h +29 -0
  47. data/data/libphonenumber/cpp/src/phonenumbers/normalize_utf8.h +50 -0
  48. data/data/libphonenumber/cpp/src/phonenumbers/phonenumber.cc +87 -0
  49. data/data/libphonenumber/cpp/src/phonenumbers/phonenumber.h +40 -0
  50. data/data/libphonenumber/cpp/src/phonenumbers/phonenumbermatch.cc +91 -0
  51. data/data/libphonenumber/cpp/src/phonenumbers/phonenumbermatch.h +125 -0
  52. data/data/libphonenumber/cpp/src/phonenumbers/phonenumbermatcher.cc +908 -0
  53. data/data/libphonenumber/cpp/src/phonenumbers/phonenumbermatcher.h +201 -0
  54. data/data/libphonenumber/cpp/src/phonenumbers/phonenumberutil.cc +2799 -0
  55. data/data/libphonenumber/cpp/src/phonenumbers/phonenumberutil.h +826 -0
  56. data/data/libphonenumber/cpp/src/phonenumbers/regex_based_matcher.cc +68 -0
  57. data/data/libphonenumber/cpp/src/phonenumbers/regex_based_matcher.h +61 -0
  58. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter.h +168 -0
  59. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter_icu.cc +237 -0
  60. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter_icu.h +41 -0
  61. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter_re2.cc +161 -0
  62. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter_re2.h +40 -0
  63. data/data/libphonenumber/cpp/src/phonenumbers/regexp_cache.cc +60 -0
  64. data/data/libphonenumber/cpp/src/phonenumbers/regexp_cache.h +77 -0
  65. data/data/libphonenumber/cpp/src/phonenumbers/regexp_factory.h +44 -0
  66. data/data/libphonenumber/cpp/src/phonenumbers/region_code.h +40 -0
  67. data/data/libphonenumber/cpp/src/phonenumbers/short_metadata.cc +2795 -0
  68. data/data/libphonenumber/cpp/src/phonenumbers/short_metadata.h +29 -0
  69. data/data/libphonenumber/cpp/src/phonenumbers/shortnumberinfo.cc +403 -0
  70. data/data/libphonenumber/cpp/src/phonenumbers/shortnumberinfo.h +237 -0
  71. data/data/libphonenumber/cpp/src/phonenumbers/stl_util.h +51 -0
  72. data/data/libphonenumber/cpp/src/phonenumbers/string_byte_sink.cc +33 -0
  73. data/data/libphonenumber/cpp/src/phonenumbers/string_byte_sink.h +40 -0
  74. data/data/libphonenumber/cpp/src/phonenumbers/stringutil.cc +448 -0
  75. data/data/libphonenumber/cpp/src/phonenumbers/stringutil.h +176 -0
  76. data/data/libphonenumber/cpp/src/phonenumbers/test_metadata.cc +888 -0
  77. data/data/libphonenumber/cpp/src/phonenumbers/unicodestring.cc +114 -0
  78. data/data/libphonenumber/cpp/src/phonenumbers/unicodestring.h +133 -0
  79. data/data/libphonenumber/cpp/src/phonenumbers/utf/README +1 -0
  80. data/data/libphonenumber/cpp/src/phonenumbers/utf/rune.c +358 -0
  81. data/data/libphonenumber/cpp/src/phonenumbers/utf/stringpiece.h +23 -0
  82. data/data/libphonenumber/cpp/src/phonenumbers/utf/stringprintf.h +22 -0
  83. data/data/libphonenumber/cpp/src/phonenumbers/utf/unicodetext.cc +520 -0
  84. data/data/libphonenumber/cpp/src/phonenumbers/utf/unicodetext.h +461 -0
  85. data/data/libphonenumber/cpp/src/phonenumbers/utf/unilib.cc +68 -0
  86. data/data/libphonenumber/cpp/src/phonenumbers/utf/unilib.h +99 -0
  87. data/data/libphonenumber/cpp/src/phonenumbers/utf/utf.h +240 -0
  88. data/data/libphonenumber/cpp/src/phonenumbers/utf/utfdef.h +27 -0
  89. data/data/libphonenumber/cpp/test/phonenumbers/asyoutypeformatter_test.cc +1237 -0
  90. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/area_code_map_test.cc +201 -0
  91. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/geocoding_data_test.cc +176 -0
  92. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/geocoding_test_data.h +50 -0
  93. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/geocoding_test_program.cc +43 -0
  94. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/mapping_file_provider_test.cc +91 -0
  95. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc +205 -0
  96. data/data/libphonenumber/cpp/test/phonenumbers/logger_test.cc +172 -0
  97. data/data/libphonenumber/cpp/test/phonenumbers/phonenumbermatch_test.cc +92 -0
  98. data/data/libphonenumber/cpp/test/phonenumbers/phonenumbermatcher_test.cc +1226 -0
  99. data/data/libphonenumber/cpp/test/phonenumbers/phonenumberutil_test.cc +3915 -0
  100. data/data/libphonenumber/cpp/test/phonenumbers/regexp_adapter_test.cc +322 -0
  101. data/data/libphonenumber/cpp/test/phonenumbers/regexp_cache_test.cc +60 -0
  102. data/data/libphonenumber/cpp/test/phonenumbers/run_tests.cc +21 -0
  103. data/data/libphonenumber/cpp/test/phonenumbers/shortnumberinfo_test.cc +468 -0
  104. data/data/libphonenumber/cpp/test/phonenumbers/stringutil_test.cc +306 -0
  105. data/data/libphonenumber/cpp/test/phonenumbers/test_util.cc +63 -0
  106. data/data/libphonenumber/cpp/test/phonenumbers/test_util.h +199 -0
  107. data/data/libphonenumber/cpp/test/phonenumbers/unicodestring_test.cc +236 -0
  108. data/data/libphonenumber/cpp/test/phonenumbers/utf/unicodetext_test.cc +45 -0
  109. data/data/libphonenumber/debian/README.source +21 -0
  110. data/data/libphonenumber/debian/changelog +5 -0
  111. data/data/libphonenumber/debian/compat +1 -0
  112. data/data/libphonenumber/debian/control +73 -0
  113. data/data/libphonenumber/debian/copyright +74 -0
  114. data/data/libphonenumber/debian/libphonenumber6-dev.install +3 -0
  115. data/data/libphonenumber/debian/libphonenumber6-java.jlibs +1 -0
  116. data/data/libphonenumber/debian/libphonenumber6-java.poms +39 -0
  117. data/data/libphonenumber/debian/libphonenumber6.install +1 -0
  118. data/data/libphonenumber/debian/maven.cleanIgnoreRules +17 -0
  119. data/data/libphonenumber/debian/maven.ignoreRules +23 -0
  120. data/data/libphonenumber/debian/maven.properties +4 -0
  121. data/data/libphonenumber/debian/maven.publishedRules +19 -0
  122. data/data/libphonenumber/debian/maven.rules +31 -0
  123. data/data/libphonenumber/debian/patches/0003-maven-exclude-demo.patch +13 -0
  124. data/data/libphonenumber/debian/patches/series +1 -0
  125. data/data/libphonenumber/debian/rules +89 -0
  126. data/data/libphonenumber/debian/source/format +1 -0
  127. data/data/libphonenumber/debian/watch +3 -0
  128. data/data/libphonenumber/java/build.xml +303 -0
  129. data/data/libphonenumber/java/carrier/pom.xml +46 -0
  130. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java +124 -0
  131. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1242_en +0 -0
  132. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1246_en +0 -0
  133. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1264_en +0 -0
  134. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1441_en +0 -0
  135. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1473_en +0 -0
  136. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1649_en +0 -0
  137. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1671_en +0 -0
  138. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1684_en +0 -0
  139. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1758_en +0 -0
  140. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1767_en +0 -0
  141. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1784_en +0 -0
  142. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1787_en +0 -0
  143. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1809_en +0 -0
  144. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1868_en +0 -0
  145. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1869_en +0 -0
  146. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1939_en +0 -0
  147. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/20_en +0 -0
  148. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/211_en +0 -0
  149. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/212_en +0 -0
  150. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/213_en +0 -0
  151. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/216_en +0 -0
  152. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/220_en +0 -0
  153. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/221_en +0 -0
  154. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/222_en +0 -0
  155. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/223_en +0 -0
  156. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/224_en +0 -0
  157. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/225_en +0 -0
  158. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/226_en +0 -0
  159. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/227_en +0 -0
  160. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/228_en +0 -0
  161. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/229_en +0 -0
  162. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/230_en +0 -0
  163. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/231_en +0 -0
  164. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/232_en +0 -0
  165. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/233_en +0 -0
  166. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/234_en +0 -0
  167. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/235_en +0 -0
  168. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/236_en +0 -0
  169. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/237_en +0 -0
  170. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/238_en +0 -0
  171. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/239_en +0 -0
  172. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/240_en +0 -0
  173. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/241_en +0 -0
  174. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/242_en +0 -0
  175. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/243_en +0 -0
  176. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/244_en +0 -0
  177. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/245_en +0 -0
  178. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/248_en +0 -0
  179. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/249_en +0 -0
  180. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/250_en +0 -0
  181. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/251_en +0 -0
  182. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/252_en +0 -0
  183. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/253_en +0 -0
  184. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/254_en +0 -0
  185. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/255_en +0 -0
  186. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/256_en +0 -0
  187. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/257_en +0 -0
  188. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/258_en +0 -0
  189. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/260_en +0 -0
  190. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/261_en +0 -0
  191. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/263_en +0 -0
  192. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/265_en +0 -0
  193. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/267_en +0 -0
  194. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/268_en +0 -0
  195. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/27_en +0 -0
  196. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/297_en +0 -0
  197. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/298_en +0 -0
  198. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/299_en +0 -0
  199. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/30_en +0 -0
  200. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/31_en +0 -0
  201. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/32_en +0 -0
  202. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/33_en +0 -0
  203. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/350_en +0 -0
  204. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/351_en +0 -0
  205. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/352_en +0 -0
  206. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/353_en +0 -0
  207. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/354_en +0 -0
  208. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/355_en +0 -0
  209. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/356_en +0 -0
  210. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/357_en +0 -0
  211. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/358_en +0 -0
  212. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/359_en +0 -0
  213. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/36_en +0 -0
  214. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/370_en +0 -0
  215. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/372_en +0 -0
  216. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/373_en +0 -0
  217. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/374_en +0 -0
  218. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/375_be +0 -0
  219. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/375_en +0 -0
  220. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/375_ru +0 -0
  221. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/376_en +0 -0
  222. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/380_en +0 -0
  223. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/381_en +0 -0
  224. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/385_en +0 -0
  225. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/386_en +0 -0
  226. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/387_en +0 -0
  227. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/389_en +0 -0
  228. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/39_en +0 -0
  229. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/40_en +0 -0
  230. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/41_en +0 -0
  231. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/420_en +0 -0
  232. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/421_en +0 -0
  233. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/43_en +0 -0
  234. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/45_en +0 -0
  235. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/47_en +0 -0
  236. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/48_en +0 -0
  237. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/49_en +0 -0
  238. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/501_en +0 -0
  239. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/505_en +0 -0
  240. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/506_en +0 -0
  241. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/507_en +0 -0
  242. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/51_en +0 -0
  243. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/53_en +0 -0
  244. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/54_en +0 -0
  245. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/55_en +0 -0
  246. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/56_en +0 -0
  247. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/57_en +0 -0
  248. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/58_en +0 -0
  249. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/591_en +0 -0
  250. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/595_en +0 -0
  251. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/597_en +0 -0
  252. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/598_en +0 -0
  253. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/599_en +0 -0
  254. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/60_en +0 -0
  255. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/61_en +0 -0
  256. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/62_en +0 -0
  257. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/63_en +0 -0
  258. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/64_en +0 -0
  259. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/65_en +0 -0
  260. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/66_en +0 -0
  261. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/670_en +0 -0
  262. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/673_en +0 -0
  263. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/675_en +0 -0
  264. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/676_en +0 -0
  265. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/677_en +0 -0
  266. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/678_en +0 -0
  267. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/679_en +0 -0
  268. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/685_en +0 -0
  269. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/686_en +0 -0
  270. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/7_en +0 -0
  271. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/84_en +0 -0
  272. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/852_en +0 -0
  273. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/855_en +0 -0
  274. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/856_en +0 -0
  275. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/86_en +0 -0
  276. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/880_en +0 -0
  277. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/90_en +0 -0
  278. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/91_en +0 -0
  279. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/92_en +0 -0
  280. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/93_en +0 -0
  281. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/94_en +0 -0
  282. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/95_en +0 -0
  283. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/960_en +0 -0
  284. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/961_en +0 -0
  285. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/962_en +0 -0
  286. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/964_en +0 -0
  287. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/965_ar +0 -0
  288. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/965_en +0 -0
  289. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/966_en +0 -0
  290. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/967_en +0 -0
  291. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/968_en +0 -0
  292. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/970_en +0 -0
  293. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/971_en +0 -0
  294. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/972_en +0 -0
  295. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/973_en +0 -0
  296. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/974_en +0 -0
  297. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/975_en +0 -0
  298. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/977_en +0 -0
  299. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/98_en +0 -0
  300. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/992_en +0 -0
  301. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/993_en +0 -0
  302. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/994_en +0 -0
  303. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/995_en +0 -0
  304. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/996_en +0 -0
  305. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/998_en +0 -0
  306. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/config +0 -0
  307. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapperTest.java +121 -0
  308. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/1650_en +0 -0
  309. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/244_en +0 -0
  310. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/44_en +0 -0
  311. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/44_sv +0 -0
  312. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/config +0 -0
  313. data/data/libphonenumber/java/demo/README +16 -0
  314. data/data/libphonenumber/java/demo/build.xml +59 -0
  315. data/data/libphonenumber/java/demo/pom.xml +107 -0
  316. data/data/libphonenumber/java/demo/src/com/google/phonenumbers/PhoneNumberParserServlet.java +298 -0
  317. data/data/libphonenumber/java/demo/war/WEB-INF/appengine-web.xml +11 -0
  318. data/data/libphonenumber/java/demo/war/WEB-INF/lib/commons-fileupload-1.2.1.jar +0 -0
  319. data/data/libphonenumber/java/demo/war/WEB-INF/lib/commons-io-1.4.jar +0 -0
  320. data/data/libphonenumber/java/demo/war/WEB-INF/logging.properties +13 -0
  321. data/data/libphonenumber/java/demo/war/WEB-INF/web.xml +18 -0
  322. data/data/libphonenumber/java/demo/war/favicon.ico +0 -0
  323. data/data/libphonenumber/java/demo/war/phonenumberparser.jsp +39 -0
  324. data/data/libphonenumber/java/demo/war/stylesheets/main.css +26 -0
  325. data/data/libphonenumber/java/geocoder/pom.xml +54 -0
  326. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java +192 -0
  327. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java +228 -0
  328. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1201_en +0 -0
  329. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1202_en +0 -0
  330. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1203_en +0 -0
  331. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1204_en +0 -0
  332. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1205_en +0 -0
  333. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1206_en +0 -0
  334. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1207_en +0 -0
  335. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1208_en +0 -0
  336. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1209_en +0 -0
  337. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1210_en +0 -0
  338. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1212_en +0 -0
  339. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1213_en +0 -0
  340. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1214_en +0 -0
  341. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1215_en +0 -0
  342. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1216_en +0 -0
  343. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1217_en +0 -0
  344. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1218_en +0 -0
  345. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1219_en +0 -0
  346. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1224_en +0 -0
  347. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1225_en +0 -0
  348. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1226_en +0 -0
  349. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1228_en +0 -0
  350. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1229_en +0 -0
  351. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1231_en +0 -0
  352. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1234_en +0 -0
  353. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1236_en +0 -0
  354. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1239_en +0 -0
  355. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1240_en +0 -0
  356. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1242_en +0 -0
  357. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1248_en +0 -0
  358. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1250_en +0 -0
  359. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1251_en +0 -0
  360. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1252_en +0 -0
  361. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1253_en +0 -0
  362. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1254_en +0 -0
  363. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1256_en +0 -0
  364. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1260_en +0 -0
  365. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1262_en +0 -0
  366. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1267_en +0 -0
  367. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1269_en +0 -0
  368. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1270_en +0 -0
  369. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1272_en +0 -0
  370. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1276_en +0 -0
  371. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1281_en +0 -0
  372. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1289_en +0 -0
  373. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1301_en +0 -0
  374. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1302_en +0 -0
  375. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1303_en +0 -0
  376. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1304_en +0 -0
  377. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1305_en +0 -0
  378. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1306_en +0 -0
  379. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1307_en +0 -0
  380. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1308_en +0 -0
  381. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1309_en +0 -0
  382. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1310_en +0 -0
  383. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1312_en +0 -0
  384. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1313_en +0 -0
  385. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1314_en +0 -0
  386. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1315_en +0 -0
  387. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1316_en +0 -0
  388. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1317_en +0 -0
  389. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1318_en +0 -0
  390. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1319_en +0 -0
  391. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1320_en +0 -0
  392. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1321_en +0 -0
  393. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1323_en +0 -0
  394. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1325_en +0 -0
  395. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1330_en +0 -0
  396. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1331_en +0 -0
  397. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1334_en +0 -0
  398. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1336_en +0 -0
  399. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1337_en +0 -0
  400. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1339_en +0 -0
  401. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1345_en +0 -0
  402. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1346_en +0 -0
  403. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1347_en +0 -0
  404. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1351_en +0 -0
  405. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1352_en +0 -0
  406. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1360_en +0 -0
  407. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1361_en +0 -0
  408. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1364_en +0 -0
  409. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1365_en +0 -0
  410. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1385_en +0 -0
  411. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1386_en +0 -0
  412. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1401_en +0 -0
  413. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1402_en +0 -0
  414. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1403_en +0 -0
  415. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1404_en +0 -0
  416. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1405_en +0 -0
  417. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1406_en +0 -0
  418. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1407_en +0 -0
  419. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1408_en +0 -0
  420. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1409_en +0 -0
  421. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1410_en +0 -0
  422. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1412_en +0 -0
  423. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1413_en +0 -0
  424. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1414_en +0 -0
  425. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1415_en +0 -0
  426. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1416_en +0 -0
  427. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1417_en +0 -0
  428. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1418_en +0 -0
  429. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1419_en +0 -0
  430. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1423_en +0 -0
  431. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1424_en +0 -0
  432. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1425_en +0 -0
  433. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1430_en +0 -0
  434. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1431_en +0 -0
  435. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1432_en +0 -0
  436. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1434_en +0 -0
  437. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1435_en +0 -0
  438. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1437_en +0 -0
  439. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1438_en +0 -0
  440. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1440_en +0 -0
  441. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1441_en +0 -0
  442. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1443_en +0 -0
  443. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1450_en +0 -0
  444. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1469_en +0 -0
  445. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1478_en +0 -0
  446. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1479_en +0 -0
  447. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1480_en +0 -0
  448. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1484_en +0 -0
  449. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1501_en +0 -0
  450. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1502_en +0 -0
  451. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1503_en +0 -0
  452. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1504_en +0 -0
  453. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1505_en +0 -0
  454. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1506_en +0 -0
  455. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1507_en +0 -0
  456. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1508_en +0 -0
  457. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1509_en +0 -0
  458. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1510_en +0 -0
  459. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1512_en +0 -0
  460. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1513_en +0 -0
  461. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1514_en +0 -0
  462. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1515_en +0 -0
  463. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1516_en +0 -0
  464. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1517_en +0 -0
  465. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1518_en +0 -0
  466. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1519_en +0 -0
  467. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1520_en +0 -0
  468. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1530_en +0 -0
  469. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1540_en +0 -0
  470. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1541_en +0 -0
  471. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1551_en +0 -0
  472. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1559_en +0 -0
  473. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1561_en +0 -0
  474. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1562_en +0 -0
  475. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1563_en +0 -0
  476. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1567_en +0 -0
  477. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1570_en +0 -0
  478. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1571_en +0 -0
  479. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1573_en +0 -0
  480. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1574_en +0 -0
  481. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1575_en +0 -0
  482. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1580_en +0 -0
  483. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1585_en +0 -0
  484. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1586_en +0 -0
  485. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1587_en +0 -0
  486. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1601_en +0 -0
  487. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1602_en +0 -0
  488. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1603_en +0 -0
  489. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1604_en +0 -0
  490. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1605_en +0 -0
  491. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1606_en +0 -0
  492. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1607_en +0 -0
  493. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1608_en +0 -0
  494. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1609_en +0 -0
  495. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1610_en +0 -0
  496. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1612_en +0 -0
  497. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1613_en +0 -0
  498. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1614_en +0 -0
  499. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1615_en +0 -0
  500. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1616_en +0 -0
  501. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1617_en +0 -0
  502. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1618_en +0 -0
  503. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1619_en +0 -0
  504. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1620_en +0 -0
  505. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1623_en +0 -0
  506. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1626_en +0 -0
  507. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1630_en +0 -0
  508. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1631_en +0 -0
  509. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1636_en +0 -0
  510. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1639_en +0 -0
  511. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1641_en +0 -0
  512. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1646_en +0 -0
  513. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1647_en +0 -0
  514. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1649_en +0 -0
  515. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1650_en +0 -0
  516. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1651_en +0 -0
  517. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1657_en +0 -0
  518. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1660_en +0 -0
  519. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1661_en +0 -0
  520. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1662_en +0 -0
  521. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1667_en +0 -0
  522. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1669_en +0 -0
  523. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1671_en +0 -0
  524. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1678_en +0 -0
  525. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1682_en +0 -0
  526. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1701_en +0 -0
  527. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1702_en +0 -0
  528. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1703_en +0 -0
  529. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1704_en +0 -0
  530. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1705_en +0 -0
  531. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1706_en +0 -0
  532. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1707_en +0 -0
  533. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1708_en +0 -0
  534. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1709_en +0 -0
  535. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1712_en +0 -0
  536. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1713_en +0 -0
  537. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1714_en +0 -0
  538. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1715_en +0 -0
  539. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1716_en +0 -0
  540. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1717_en +0 -0
  541. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1718_en +0 -0
  542. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1719_en +0 -0
  543. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1720_en +0 -0
  544. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1724_en +0 -0
  545. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1725_en +0 -0
  546. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1726_en +0 -0
  547. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1727_en +0 -0
  548. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1730_en +0 -0
  549. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1731_en +0 -0
  550. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1732_en +0 -0
  551. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1734_en +0 -0
  552. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1737_en +0 -0
  553. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1740_en +0 -0
  554. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1754_en +0 -0
  555. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1757_en +0 -0
  556. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1760_en +0 -0
  557. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1763_en +0 -0
  558. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1765_en +0 -0
  559. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1769_en +0 -0
  560. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1770_en +0 -0
  561. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1772_en +0 -0
  562. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1773_en +0 -0
  563. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1774_en +0 -0
  564. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1775_en +0 -0
  565. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1778_en +0 -0
  566. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1779_en +0 -0
  567. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1780_en +0 -0
  568. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1781_en +0 -0
  569. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1782_en +0 -0
  570. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1785_en +0 -0
  571. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1786_en +0 -0
  572. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1801_en +0 -0
  573. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1802_en +0 -0
  574. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1803_en +0 -0
  575. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1804_en +0 -0
  576. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1805_en +0 -0
  577. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1806_en +0 -0
  578. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1807_en +0 -0
  579. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1808_en +0 -0
  580. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1809_en +0 -0
  581. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1810_en +0 -0
  582. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1812_en +0 -0
  583. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1813_en +0 -0
  584. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1814_en +0 -0
  585. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1815_en +0 -0
  586. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1816_en +0 -0
  587. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1817_en +0 -0
  588. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1818_en +0 -0
  589. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1819_en +0 -0
  590. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1828_en +0 -0
  591. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1830_en +0 -0
  592. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1831_en +0 -0
  593. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1832_en +0 -0
  594. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1838_en +0 -0
  595. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1843_en +0 -0
  596. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1845_en +0 -0
  597. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1847_en +0 -0
  598. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1848_en +0 -0
  599. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1850_en +0 -0
  600. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1851_en +0 -0
  601. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1856_en +0 -0
  602. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1857_en +0 -0
  603. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1858_en +0 -0
  604. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1859_en +0 -0
  605. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1860_en +0 -0
  606. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1862_en +0 -0
  607. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1863_en +0 -0
  608. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1864_en +0 -0
  609. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1865_en +0 -0
  610. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1867_en +0 -0
  611. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1870_en +0 -0
  612. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1872_en +0 -0
  613. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1873_en +0 -0
  614. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1876_en +0 -0
  615. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1878_en +0 -0
  616. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1888_en +0 -0
  617. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1901_en +0 -0
  618. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1902_en +0 -0
  619. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1903_en +0 -0
  620. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1904_en +0 -0
  621. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1905_en +0 -0
  622. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1906_en +0 -0
  623. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1907_en +0 -0
  624. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1908_en +0 -0
  625. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1909_en +0 -0
  626. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1910_en +0 -0
  627. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1912_en +0 -0
  628. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1913_en +0 -0
  629. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1914_en +0 -0
  630. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1915_en +0 -0
  631. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1916_en +0 -0
  632. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1917_en +0 -0
  633. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1918_en +0 -0
  634. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1919_en +0 -0
  635. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1920_en +0 -0
  636. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1925_en +0 -0
  637. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1928_en +0 -0
  638. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1929_en +0 -0
  639. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1930_en +0 -0
  640. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1931_en +0 -0
  641. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1936_en +0 -0
  642. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1937_en +0 -0
  643. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1938_en +0 -0
  644. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1940_en +0 -0
  645. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1941_en +0 -0
  646. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1947_en +0 -0
  647. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1949_en +0 -0
  648. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1951_en +0 -0
  649. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1952_en +0 -0
  650. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1954_en +0 -0
  651. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1956_en +0 -0
  652. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1959_en +0 -0
  653. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1970_en +0 -0
  654. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1971_en +0 -0
  655. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1972_en +0 -0
  656. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1973_en +0 -0
  657. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1978_en +0 -0
  658. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1979_en +0 -0
  659. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1980_en +0 -0
  660. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1984_en +0 -0
  661. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1985_en +0 -0
  662. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1989_en +0 -0
  663. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/20_en +0 -0
  664. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/212_en +0 -0
  665. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/212_fr +0 -0
  666. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/213_en +0 -0
  667. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/216_en +0 -0
  668. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/220_en +0 -0
  669. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/221_en +0 -0
  670. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/222_en +0 -0
  671. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/222_fr +0 -0
  672. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/224_en +0 -0
  673. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/225_en +0 -0
  674. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/225_fr +0 -0
  675. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/226_en +0 -0
  676. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/228_en +0 -0
  677. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/228_es +0 -0
  678. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/228_fr +0 -0
  679. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/229_en +0 -0
  680. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/229_fr +0 -0
  681. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/230_en +0 -0
  682. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/230_es +0 -0
  683. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/230_fr +0 -0
  684. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/232_en +0 -0
  685. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/233_en +0 -0
  686. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/234_en +0 -0
  687. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/237_en +0 -0
  688. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/238_en +0 -0
  689. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/238_pt +0 -0
  690. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/239_en +0 -0
  691. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/239_pt +0 -0
  692. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/241_en +0 -0
  693. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/242_en +0 -0
  694. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/242_fr +0 -0
  695. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/243_en +0 -0
  696. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/243_fr +0 -0
  697. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/244_en +0 -0
  698. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/244_pt +0 -0
  699. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/245_en +0 -0
  700. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/245_pt +0 -0
  701. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/247_en +0 -0
  702. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/249_en +0 -0
  703. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/251_en +0 -0
  704. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/252_en +0 -0
  705. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/254_en +0 -0
  706. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/256_en +0 -0
  707. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/257_en +0 -0
  708. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/258_en +0 -0
  709. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/258_pt +0 -0
  710. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/260_en +0 -0
  711. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/261_en +0 -0
  712. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/263_en +0 -0
  713. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/264_en +0 -0
  714. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/266_en +0 -0
  715. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/267_en +0 -0
  716. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/268_en +0 -0
  717. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/269_en +0 -0
  718. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/269_fr +0 -0
  719. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/27_en +0 -0
  720. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/290_en +0 -0
  721. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/290_fr +0 -0
  722. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/299_en +0 -0
  723. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/30_el +0 -0
  724. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/30_en +0 -0
  725. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/31_en +0 -0
  726. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/31_nl +0 -0
  727. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/32_de +0 -0
  728. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/32_en +0 -0
  729. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/32_fr +0 -0
  730. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/32_nl +0 -0
  731. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/33_en +0 -0
  732. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/33_fr +0 -0
  733. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/34_en +0 -0
  734. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/34_es +0 -0
  735. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/351_en +0 -0
  736. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/351_pt +0 -0
  737. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/352_de +0 -0
  738. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/352_en +0 -0
  739. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/352_fr +0 -0
  740. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/353_en +0 -0
  741. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/354_en +0 -0
  742. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/355_en +0 -0
  743. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/358_en +0 -0
  744. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/358_fi +0 -0
  745. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/358_se +0 -0
  746. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/359_bg +0 -0
  747. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/359_en +0 -0
  748. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/36_en +0 -0
  749. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/36_hu +0 -0
  750. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/370_en +0 -0
  751. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/371_en +0 -0
  752. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/372_en +0 -0
  753. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/373_en +0 -0
  754. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/373_ro +0 -0
  755. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/373_ru +0 -0
  756. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/374_am +0 -0
  757. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/374_en +0 -0
  758. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/374_ru +0 -0
  759. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/375_be +0 -0
  760. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/375_en +0 -0
  761. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/375_ru +0 -0
  762. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/381_en +0 -0
  763. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/381_sr +0 -0
  764. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/389_en +0 -0
  765. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/39_en +0 -0
  766. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/39_it +0 -0
  767. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/40_en +0 -0
  768. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/40_ro +0 -0
  769. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/41_de +0 -0
  770. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/41_en +0 -0
  771. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/41_fr +0 -0
  772. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/41_it +0 -0
  773. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/420_en +0 -0
  774. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/421_en +0 -0
  775. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/43_de +0 -0
  776. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/43_en +0 -0
  777. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/44_en +0 -0
  778. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/46_en +0 -0
  779. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/46_sv +0 -0
  780. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/47_en +0 -0
  781. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/48_en +0 -0
  782. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/48_pl +0 -0
  783. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/49_de +0 -0
  784. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/49_en +0 -0
  785. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/51_en +0 -0
  786. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/53_en +0 -0
  787. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/54_en +0 -0
  788. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/54_es +0 -0
  789. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/55_en +0 -0
  790. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/55_pt +0 -0
  791. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/56_en +0 -0
  792. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/56_es +0 -0
  793. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/57_en +0 -0
  794. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/58_en +0 -0
  795. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/58_es +0 -0
  796. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/599_en +0 -0
  797. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/62_en +0 -0
  798. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/62_id +0 -0
  799. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/66_en +0 -0
  800. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/66_th +0 -0
  801. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/686_en +0 -0
  802. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/7_en +0 -0
  803. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/7_ru +0 -0
  804. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/81_en +0 -0
  805. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/81_ja +0 -0
  806. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_ar +0 -0
  807. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_cs +0 -0
  808. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_en +0 -0
  809. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_fr +0 -0
  810. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_ko +0 -0
  811. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_zh +0 -0
  812. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_zh_Hant +0 -0
  813. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/84_en +0 -0
  814. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/84_vi +0 -0
  815. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/86_en +0 -0
  816. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/86_zh +0 -0
  817. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/886_en +0 -0
  818. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/886_zh +0 -0
  819. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/886_zh_Hant +0 -0
  820. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/90_en +0 -0
  821. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/90_tr +0 -0
  822. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/91_en +0 -0
  823. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/94_en +0 -0
  824. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/962_en +0 -0
  825. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/966_ar +0 -0
  826. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/966_en +0 -0
  827. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/98_en +0 -0
  828. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/98_fa +0 -0
  829. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config +0 -0
  830. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/timezones/data/map_data +0 -0
  831. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapperTest.java +136 -0
  832. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoderTest.java +163 -0
  833. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1201_de +0 -0
  834. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1201_en +0 -0
  835. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1212_en +0 -0
  836. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1617_en +0 -0
  837. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1650_de +0 -0
  838. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1650_en +0 -0
  839. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1989_en +0 -0
  840. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/54_en +0 -0
  841. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/82_en +0 -0
  842. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/82_ko +0 -0
  843. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/config +0 -0
  844. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/timezones/testing_data/map_data +0 -0
  845. data/data/libphonenumber/java/internal/prefixmapper/pom.xml +36 -0
  846. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/DefaultMapStorage.java +94 -0
  847. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/FlyweightMapStorage.java +263 -0
  848. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/MappingFileProvider.java +229 -0
  849. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PhonePrefixMap.java +216 -0
  850. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PhonePrefixMapStorageStrategy.java +108 -0
  851. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PrefixFileReader.java +143 -0
  852. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PrefixTimeZonesMap.java +126 -0
  853. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/FlyweightMapStorageTest.java +107 -0
  854. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/MappingFileProviderTest.java +93 -0
  855. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/PhonePrefixMapTest.java +193 -0
  856. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/PrefixFileReaderTest.java +75 -0
  857. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/PrefixTimeZonesMapTest.java +176 -0
  858. data/data/libphonenumber/java/lib/junit-4.8.1.jar +0 -0
  859. data/data/libphonenumber/java/libphonenumber/pom.xml +33 -0
  860. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java +79 -0
  861. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java +656 -0
  862. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java +941 -0
  863. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java +34 -0
  864. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java +138 -0
  865. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/NumberParseException.java +62 -0
  866. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatch.java +123 -0
  867. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java +725 -0
  868. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java +3232 -0
  869. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/Phonemetadata.java +1053 -0
  870. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/Phonenumber.java +285 -0
  871. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/RegexCache.java +78 -0
  872. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberInfo.java +587 -0
  873. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberUtil.java +80 -0
  874. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumbersRegionCodeSet.java +268 -0
  875. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_255 +0 -0
  876. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_27 +0 -0
  877. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_30 +0 -0
  878. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_31 +0 -0
  879. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_34 +0 -0
  880. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_350 +0 -0
  881. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_351 +0 -0
  882. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_352 +0 -0
  883. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_358 +0 -0
  884. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_359 +0 -0
  885. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_36 +0 -0
  886. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_372 +0 -0
  887. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_373 +0 -0
  888. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_375 +0 -0
  889. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_380 +0 -0
  890. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_381 +0 -0
  891. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_385 +0 -0
  892. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_43 +0 -0
  893. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_44 +0 -0
  894. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_49 +0 -0
  895. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_505 +0 -0
  896. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_506 +0 -0
  897. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_54 +0 -0
  898. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_55 +0 -0
  899. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_58 +0 -0
  900. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_595 +0 -0
  901. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_61 +0 -0
  902. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_62 +0 -0
  903. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_63 +0 -0
  904. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_66 +0 -0
  905. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_675 +0 -0
  906. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_676 +0 -0
  907. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_679 +0 -0
  908. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_7 +0 -0
  909. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_81 +0 -0
  910. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_84 +0 -0
  911. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_855 +0 -0
  912. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_90 +0 -0
  913. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_91 +0 -0
  914. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_94 +0 -0
  915. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_95 +0 -0
  916. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_971 +0 -0
  917. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_972 +0 -0
  918. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_995 +0 -0
  919. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_800 +0 -0
  920. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_808 +0 -0
  921. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_870 +0 -0
  922. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_878 +0 -0
  923. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_881 +0 -0
  924. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_882 +0 -0
  925. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_883 +0 -0
  926. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_888 +0 -0
  927. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_979 +0 -0
  928. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC +0 -0
  929. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD +0 -0
  930. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE +0 -0
  931. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF +0 -0
  932. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG +0 -0
  933. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI +0 -0
  934. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL +0 -0
  935. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM +0 -0
  936. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO +0 -0
  937. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR +0 -0
  938. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS +0 -0
  939. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT +0 -0
  940. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU +0 -0
  941. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW +0 -0
  942. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX +0 -0
  943. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ +0 -0
  944. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA +0 -0
  945. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB +0 -0
  946. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD +0 -0
  947. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE +0 -0
  948. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF +0 -0
  949. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG +0 -0
  950. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH +0 -0
  951. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI +0 -0
  952. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ +0 -0
  953. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL +0 -0
  954. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM +0 -0
  955. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN +0 -0
  956. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO +0 -0
  957. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BQ +0 -0
  958. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR +0 -0
  959. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS +0 -0
  960. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT +0 -0
  961. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW +0 -0
  962. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY +0 -0
  963. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ +0 -0
  964. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA +0 -0
  965. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CC +0 -0
  966. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD +0 -0
  967. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF +0 -0
  968. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG +0 -0
  969. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH +0 -0
  970. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI +0 -0
  971. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK +0 -0
  972. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL +0 -0
  973. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM +0 -0
  974. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN +0 -0
  975. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO +0 -0
  976. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR +0 -0
  977. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU +0 -0
  978. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV +0 -0
  979. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CW +0 -0
  980. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CX +0 -0
  981. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY +0 -0
  982. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ +0 -0
  983. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE +0 -0
  984. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ +0 -0
  985. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK +0 -0
  986. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM +0 -0
  987. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO +0 -0
  988. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ +0 -0
  989. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC +0 -0
  990. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE +0 -0
  991. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG +0 -0
  992. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EH +0 -0
  993. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER +0 -0
  994. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES +0 -0
  995. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET +0 -0
  996. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI +0 -0
  997. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ +0 -0
  998. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK +0 -0
  999. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM +0 -0
  1000. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO +0 -0
  1001. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR +0 -0
  1002. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA +0 -0
  1003. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB +0 -0
  1004. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD +0 -0
  1005. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE +0 -0
  1006. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF +0 -0
  1007. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG +0 -0
  1008. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH +0 -0
  1009. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI +0 -0
  1010. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL +0 -0
  1011. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM +0 -0
  1012. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN +0 -0
  1013. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP +0 -0
  1014. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ +0 -0
  1015. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR +0 -0
  1016. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT +0 -0
  1017. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU +0 -0
  1018. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW +0 -0
  1019. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY +0 -0
  1020. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK +0 -0
  1021. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN +0 -0
  1022. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR +0 -0
  1023. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT +0 -0
  1024. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU +0 -0
  1025. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID +0 -0
  1026. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE +0 -0
  1027. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL +0 -0
  1028. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM +0 -0
  1029. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN +0 -0
  1030. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO +0 -0
  1031. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ +0 -0
  1032. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR +0 -0
  1033. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS +0 -0
  1034. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT +0 -0
  1035. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE +0 -0
  1036. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM +0 -0
  1037. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO +0 -0
  1038. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP +0 -0
  1039. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE +0 -0
  1040. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG +0 -0
  1041. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH +0 -0
  1042. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI +0 -0
  1043. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM +0 -0
  1044. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN +0 -0
  1045. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP +0 -0
  1046. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR +0 -0
  1047. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW +0 -0
  1048. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY +0 -0
  1049. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ +0 -0
  1050. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA +0 -0
  1051. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB +0 -0
  1052. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC +0 -0
  1053. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI +0 -0
  1054. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK +0 -0
  1055. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR +0 -0
  1056. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS +0 -0
  1057. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT +0 -0
  1058. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU +0 -0
  1059. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV +0 -0
  1060. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY +0 -0
  1061. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA +0 -0
  1062. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC +0 -0
  1063. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD +0 -0
  1064. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME +0 -0
  1065. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF +0 -0
  1066. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG +0 -0
  1067. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH +0 -0
  1068. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK +0 -0
  1069. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML +0 -0
  1070. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM +0 -0
  1071. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN +0 -0
  1072. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO +0 -0
  1073. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP +0 -0
  1074. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ +0 -0
  1075. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR +0 -0
  1076. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS +0 -0
  1077. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT +0 -0
  1078. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU +0 -0
  1079. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV +0 -0
  1080. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW +0 -0
  1081. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX +0 -0
  1082. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY +0 -0
  1083. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ +0 -0
  1084. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA +0 -0
  1085. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC +0 -0
  1086. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE +0 -0
  1087. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF +0 -0
  1088. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG +0 -0
  1089. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI +0 -0
  1090. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL +0 -0
  1091. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO +0 -0
  1092. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP +0 -0
  1093. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR +0 -0
  1094. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU +0 -0
  1095. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ +0 -0
  1096. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM +0 -0
  1097. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA +0 -0
  1098. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE +0 -0
  1099. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF +0 -0
  1100. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG +0 -0
  1101. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH +0 -0
  1102. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK +0 -0
  1103. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL +0 -0
  1104. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM +0 -0
  1105. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR +0 -0
  1106. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS +0 -0
  1107. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT +0 -0
  1108. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW +0 -0
  1109. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY +0 -0
  1110. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA +0 -0
  1111. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE +0 -0
  1112. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO +0 -0
  1113. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS +0 -0
  1114. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU +0 -0
  1115. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW +0 -0
  1116. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA +0 -0
  1117. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB +0 -0
  1118. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC +0 -0
  1119. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD +0 -0
  1120. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE +0 -0
  1121. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG +0 -0
  1122. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH +0 -0
  1123. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI +0 -0
  1124. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ +0 -0
  1125. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK +0 -0
  1126. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL +0 -0
  1127. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM +0 -0
  1128. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN +0 -0
  1129. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO +0 -0
  1130. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR +0 -0
  1131. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SS +0 -0
  1132. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST +0 -0
  1133. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV +0 -0
  1134. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SX +0 -0
  1135. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY +0 -0
  1136. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ +0 -0
  1137. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TA +0 -0
  1138. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC +0 -0
  1139. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD +0 -0
  1140. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG +0 -0
  1141. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH +0 -0
  1142. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ +0 -0
  1143. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK +0 -0
  1144. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL +0 -0
  1145. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM +0 -0
  1146. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN +0 -0
  1147. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO +0 -0
  1148. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR +0 -0
  1149. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT +0 -0
  1150. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV +0 -0
  1151. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW +0 -0
  1152. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ +0 -0
  1153. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA +0 -0
  1154. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG +0 -0
  1155. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US +0 -0
  1156. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY +0 -0
  1157. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ +0 -0
  1158. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA +0 -0
  1159. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC +0 -0
  1160. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE +0 -0
  1161. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG +0 -0
  1162. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI +0 -0
  1163. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN +0 -0
  1164. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU +0 -0
  1165. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF +0 -0
  1166. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS +0 -0
  1167. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE +0 -0
  1168. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT +0 -0
  1169. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA +0 -0
  1170. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM +0 -0
  1171. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW +0 -0
  1172. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AC +0 -0
  1173. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AD +0 -0
  1174. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AE +0 -0
  1175. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AF +0 -0
  1176. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AG +0 -0
  1177. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AI +0 -0
  1178. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AL +0 -0
  1179. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AM +0 -0
  1180. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AO +0 -0
  1181. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AR +0 -0
  1182. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AS +0 -0
  1183. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AT +0 -0
  1184. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AU +0 -0
  1185. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AW +0 -0
  1186. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AX +0 -0
  1187. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AZ +0 -0
  1188. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BA +0 -0
  1189. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BB +0 -0
  1190. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BD +0 -0
  1191. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BE +0 -0
  1192. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BF +0 -0
  1193. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BG +0 -0
  1194. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BH +0 -0
  1195. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BI +0 -0
  1196. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BJ +0 -0
  1197. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BL +0 -0
  1198. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BM +0 -0
  1199. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BN +0 -0
  1200. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BO +0 -0
  1201. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BQ +0 -0
  1202. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BR +0 -0
  1203. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BS +0 -0
  1204. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BT +0 -0
  1205. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BW +0 -0
  1206. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BY +0 -0
  1207. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BZ +0 -0
  1208. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CA +0 -0
  1209. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CC +0 -0
  1210. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CD +0 -0
  1211. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CH +0 -0
  1212. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CI +0 -0
  1213. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CK +0 -0
  1214. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CL +0 -0
  1215. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CM +0 -0
  1216. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CN +0 -0
  1217. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CO +0 -0
  1218. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CR +0 -0
  1219. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CU +0 -0
  1220. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CV +0 -0
  1221. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CW +0 -0
  1222. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CX +0 -0
  1223. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CY +0 -0
  1224. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CZ +0 -0
  1225. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DE +0 -0
  1226. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DJ +0 -0
  1227. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DK +0 -0
  1228. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DM +0 -0
  1229. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DO +0 -0
  1230. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DZ +0 -0
  1231. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_EC +0 -0
  1232. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_EE +0 -0
  1233. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_EG +0 -0
  1234. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_EH +0 -0
  1235. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ES +0 -0
  1236. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ET +0 -0
  1237. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FI +0 -0
  1238. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FJ +0 -0
  1239. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FK +0 -0
  1240. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FM +0 -0
  1241. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FO +0 -0
  1242. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FR +0 -0
  1243. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GA +0 -0
  1244. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GB +0 -0
  1245. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GD +0 -0
  1246. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GE +0 -0
  1247. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GF +0 -0
  1248. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GG +0 -0
  1249. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GH +0 -0
  1250. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GI +0 -0
  1251. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GL +0 -0
  1252. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GM +0 -0
  1253. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GN +0 -0
  1254. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GP +0 -0
  1255. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GR +0 -0
  1256. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GT +0 -0
  1257. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GU +0 -0
  1258. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GW +0 -0
  1259. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GY +0 -0
  1260. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HK +0 -0
  1261. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HN +0 -0
  1262. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HR +0 -0
  1263. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HT +0 -0
  1264. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HU +0 -0
  1265. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ID +0 -0
  1266. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IE +0 -0
  1267. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IL +0 -0
  1268. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IM +0 -0
  1269. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IN +0 -0
  1270. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IQ +0 -0
  1271. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IR +0 -0
  1272. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IS +0 -0
  1273. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IT +0 -0
  1274. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_JE +0 -0
  1275. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_JM +0 -0
  1276. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_JO +0 -0
  1277. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_JP +0 -0
  1278. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KE +0 -0
  1279. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KG +0 -0
  1280. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KH +0 -0
  1281. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KI +0 -0
  1282. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KM +0 -0
  1283. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KN +0 -0
  1284. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KR +0 -0
  1285. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KW +0 -0
  1286. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KY +0 -0
  1287. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KZ +0 -0
  1288. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LA +0 -0
  1289. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LB +0 -0
  1290. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LC +0 -0
  1291. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LI +0 -0
  1292. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LK +0 -0
  1293. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LR +0 -0
  1294. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LS +0 -0
  1295. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LT +0 -0
  1296. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LU +0 -0
  1297. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LV +0 -0
  1298. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LY +0 -0
  1299. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MA +0 -0
  1300. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MC +0 -0
  1301. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MD +0 -0
  1302. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ME +0 -0
  1303. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MF +0 -0
  1304. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MG +0 -0
  1305. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MH +0 -0
  1306. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MK +0 -0
  1307. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ML +0 -0
  1308. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MM +0 -0
  1309. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MN +0 -0
  1310. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MO +0 -0
  1311. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MP +0 -0
  1312. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MQ +0 -0
  1313. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MR +0 -0
  1314. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MS +0 -0
  1315. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MT +0 -0
  1316. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MU +0 -0
  1317. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MV +0 -0
  1318. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MW +0 -0
  1319. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MX +0 -0
  1320. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MY +0 -0
  1321. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MZ +0 -0
  1322. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NA +0 -0
  1323. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NC +0 -0
  1324. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NF +0 -0
  1325. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NG +0 -0
  1326. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NI +0 -0
  1327. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NL +0 -0
  1328. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NO +0 -0
  1329. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NP +0 -0
  1330. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NR +0 -0
  1331. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NU +0 -0
  1332. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NZ +0 -0
  1333. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_OM +0 -0
  1334. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PA +0 -0
  1335. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PE +0 -0
  1336. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PF +0 -0
  1337. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PG +0 -0
  1338. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PH +0 -0
  1339. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PK +0 -0
  1340. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PL +0 -0
  1341. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PM +0 -0
  1342. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PR +0 -0
  1343. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PT +0 -0
  1344. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PW +0 -0
  1345. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PY +0 -0
  1346. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_QA +0 -0
  1347. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RE +0 -0
  1348. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RO +0 -0
  1349. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RS +0 -0
  1350. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RU +0 -0
  1351. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RW +0 -0
  1352. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SA +0 -0
  1353. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SB +0 -0
  1354. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SC +0 -0
  1355. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SD +0 -0
  1356. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SE +0 -0
  1357. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SG +0 -0
  1358. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SH +0 -0
  1359. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SI +0 -0
  1360. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SJ +0 -0
  1361. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SK +0 -0
  1362. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SL +0 -0
  1363. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SM +0 -0
  1364. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SN +0 -0
  1365. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SR +0 -0
  1366. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ST +0 -0
  1367. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SV +0 -0
  1368. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SX +0 -0
  1369. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SY +0 -0
  1370. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SZ +0 -0
  1371. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TC +0 -0
  1372. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TD +0 -0
  1373. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TG +0 -0
  1374. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TH +0 -0
  1375. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TJ +0 -0
  1376. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TL +0 -0
  1377. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TM +0 -0
  1378. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TN +0 -0
  1379. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TO +0 -0
  1380. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TR +0 -0
  1381. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TT +0 -0
  1382. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TV +0 -0
  1383. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TW +0 -0
  1384. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TZ +0 -0
  1385. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_UA +0 -0
  1386. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_UG +0 -0
  1387. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_US +0 -0
  1388. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_UY +0 -0
  1389. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_UZ +0 -0
  1390. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VA +0 -0
  1391. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VC +0 -0
  1392. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VE +0 -0
  1393. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VG +0 -0
  1394. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VI +0 -0
  1395. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VN +0 -0
  1396. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VU +0 -0
  1397. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_WF +0 -0
  1398. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_WS +0 -0
  1399. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_YE +0 -0
  1400. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_YT +0 -0
  1401. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZA +0 -0
  1402. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZM +0 -0
  1403. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZW +0 -0
  1404. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/internal/MatcherApi.java +38 -0
  1405. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/internal/RegexBasedMatcher.java +52 -0
  1406. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/AsYouTypeFormatterTest.java +1173 -0
  1407. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMapForTesting.java +142 -0
  1408. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/ExampleNumbersTest.java +256 -0
  1409. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/MetadataManagerTest.java +51 -0
  1410. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberMatchTest.java +70 -0
  1411. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberMatcherTest.java +1090 -0
  1412. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java +2570 -0
  1413. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/PhonenumberTest.java +112 -0
  1414. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/RegexCacheTest.java +55 -0
  1415. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/RegionCode.java +61 -0
  1416. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/ShortNumberInfoTest.java +344 -0
  1417. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/ShortNumberUtilTest.java +140 -0
  1418. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/TestMetadataTestCase.java +46 -0
  1419. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_800 +0 -0
  1420. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_979 +0 -0
  1421. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD +0 -0
  1422. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AE +0 -0
  1423. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO +0 -0
  1424. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR +0 -0
  1425. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU +0 -0
  1426. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BB +0 -0
  1427. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BR +0 -0
  1428. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS +0 -0
  1429. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BY +0 -0
  1430. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_CA +0 -0
  1431. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_CC +0 -0
  1432. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_CN +0 -0
  1433. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_CX +0 -0
  1434. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE +0 -0
  1435. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_FR +0 -0
  1436. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB +0 -0
  1437. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GG +0 -0
  1438. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_HU +0 -0
  1439. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT +0 -0
  1440. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP +0 -0
  1441. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR +0 -0
  1442. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX +0 -0
  1443. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ +0 -0
  1444. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL +0 -0
  1445. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE +0 -0
  1446. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG +0 -0
  1447. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US +0 -0
  1448. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT +0 -0
  1449. data/data/libphonenumber/java/pom.xml +186 -0
  1450. data/data/libphonenumber/java/release_notes.txt +963 -0
  1451. data/data/libphonenumber/javadoc/allclasses-frame.html +49 -0
  1452. data/data/libphonenumber/javadoc/allclasses-noframe.html +49 -0
  1453. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/AsYouTypeFormatter.html +302 -0
  1454. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/NumberParseException.ErrorType.html +369 -0
  1455. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/NumberParseException.html +311 -0
  1456. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberMatch.html +378 -0
  1457. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.Leniency.html +330 -0
  1458. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.MatchType.html +373 -0
  1459. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.PhoneNumberFormat.html +365 -0
  1460. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.PhoneNumberType.html +469 -0
  1461. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.ValidationResult.html +357 -0
  1462. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.html +1405 -0
  1463. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/package-frame.html +68 -0
  1464. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/package-summary.html +211 -0
  1465. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/package-tree.html +161 -0
  1466. data/data/libphonenumber/javadoc/constant-values.html +142 -0
  1467. data/data/libphonenumber/javadoc/deprecated-list.html +142 -0
  1468. data/data/libphonenumber/javadoc/help-doc.html +209 -0
  1469. data/data/libphonenumber/javadoc/index-all.html +413 -0
  1470. data/data/libphonenumber/javadoc/index.html +36 -0
  1471. data/data/libphonenumber/javadoc/overview-tree.html +163 -0
  1472. data/data/libphonenumber/javadoc/package-list +1 -0
  1473. data/data/libphonenumber/javadoc/resources/inherit.gif +0 -0
  1474. data/data/libphonenumber/javadoc/serialized-form.html +184 -0
  1475. data/data/libphonenumber/javadoc/stylesheet.css +29 -0
  1476. data/data/libphonenumber/javascript/README +99 -0
  1477. data/data/libphonenumber/javascript/build.xml +137 -0
  1478. data/data/libphonenumber/javascript/i18n/phonenumbers/asyoutypeformatter.js +1108 -0
  1479. data/data/libphonenumber/javascript/i18n/phonenumbers/asyoutypeformatter_test.html +38 -0
  1480. data/data/libphonenumber/javascript/i18n/phonenumbers/asyoutypeformatter_test.js +1205 -0
  1481. data/data/libphonenumber/javascript/i18n/phonenumbers/demo-compiled.html +53 -0
  1482. data/data/libphonenumber/javascript/i18n/phonenumbers/demo-compiled.js +510 -0
  1483. data/data/libphonenumber/javascript/i18n/phonenumbers/demo.html +62 -0
  1484. data/data/libphonenumber/javascript/i18n/phonenumbers/demo.js +161 -0
  1485. data/data/libphonenumber/javascript/i18n/phonenumbers/metadata.js +5167 -0
  1486. data/data/libphonenumber/javascript/i18n/phonenumbers/metadatafortesting.js +616 -0
  1487. data/data/libphonenumber/javascript/i18n/phonenumbers/metadatalite.js +5167 -0
  1488. data/data/libphonenumber/javascript/i18n/phonenumbers/phonemetadata.pb.js +2283 -0
  1489. data/data/libphonenumber/javascript/i18n/phonenumbers/phonenumber.pb.js +520 -0
  1490. data/data/libphonenumber/javascript/i18n/phonenumbers/phonenumberutil.js +4194 -0
  1491. data/data/libphonenumber/javascript/i18n/phonenumbers/phonenumberutil_test.html +37 -0
  1492. data/data/libphonenumber/javascript/i18n/phonenumbers/phonenumberutil_test.js +3322 -0
  1493. data/data/libphonenumber/javascript/i18n/phonenumbers/regioncodefortesting.js +66 -0
  1494. data/data/libphonenumber/pom.xml +26 -0
  1495. data/data/libphonenumber/resources/PhoneNumberAlternateFormats.xml +1853 -0
  1496. data/data/{PhoneNumberMetaData.xml → libphonenumber/resources/PhoneNumberMetadata.xml} +0 -0
  1497. data/data/libphonenumber/resources/PhoneNumberMetadataForTesting.xml +938 -0
  1498. data/data/libphonenumber/resources/ShortNumberMetadata.xml +8725 -0
  1499. data/data/libphonenumber/resources/carrier/README +2 -0
  1500. data/data/libphonenumber/resources/carrier/ar/965.txt +17 -0
  1501. data/data/libphonenumber/resources/carrier/be/375.txt +28 -0
  1502. data/data/libphonenumber/resources/carrier/en/1.txt +459 -0
  1503. data/data/libphonenumber/resources/carrier/en/20.txt +17 -0
  1504. data/data/libphonenumber/resources/carrier/en/211.txt +18 -0
  1505. data/data/libphonenumber/resources/carrier/en/212.txt +107 -0
  1506. data/data/libphonenumber/resources/carrier/en/213.txt +20 -0
  1507. data/data/libphonenumber/resources/carrier/en/216.txt +26 -0
  1508. data/data/libphonenumber/resources/carrier/en/220.txt +19 -0
  1509. data/data/libphonenumber/resources/carrier/en/221.txt +23 -0
  1510. data/data/libphonenumber/resources/carrier/en/222.txt +19 -0
  1511. data/data/libphonenumber/resources/carrier/en/223.txt +15 -0
  1512. data/data/libphonenumber/resources/carrier/en/224.txt +21 -0
  1513. data/data/libphonenumber/resources/carrier/en/225.txt +52 -0
  1514. data/data/libphonenumber/resources/carrier/en/226.txt +36 -0
  1515. data/data/libphonenumber/resources/carrier/en/227.txt +24 -0
  1516. data/data/libphonenumber/resources/carrier/en/228.txt +16 -0
  1517. data/data/libphonenumber/resources/carrier/en/229.txt +26 -0
  1518. data/data/libphonenumber/resources/carrier/en/230.txt +61 -0
  1519. data/data/libphonenumber/resources/carrier/en/231.txt +19 -0
  1520. data/data/libphonenumber/resources/carrier/en/232.txt +21 -0
  1521. data/data/libphonenumber/resources/carrier/en/233.txt +23 -0
  1522. data/data/libphonenumber/resources/carrier/en/234.txt +245 -0
  1523. data/data/libphonenumber/resources/carrier/en/235.txt +15 -0
  1524. data/data/libphonenumber/resources/carrier/en/236.txt +18 -0
  1525. data/data/libphonenumber/resources/carrier/en/237.txt +27 -0
  1526. data/data/libphonenumber/resources/carrier/en/238.txt +20 -0
  1527. data/data/libphonenumber/resources/carrier/en/239.txt +16 -0
  1528. data/data/libphonenumber/resources/carrier/en/240.txt +17 -0
  1529. data/data/libphonenumber/resources/carrier/en/241.txt +35 -0
  1530. data/data/libphonenumber/resources/carrier/en/242.txt +16 -0
  1531. data/data/libphonenumber/resources/carrier/en/243.txt +23 -0
  1532. data/data/libphonenumber/resources/carrier/en/244.txt +19 -0
  1533. data/data/libphonenumber/resources/carrier/en/245.txt +16 -0
  1534. data/data/libphonenumber/resources/carrier/en/248.txt +16 -0
  1535. data/data/libphonenumber/resources/carrier/en/249.txt +19 -0
  1536. data/data/libphonenumber/resources/carrier/en/250.txt +15 -0
  1537. data/data/libphonenumber/resources/carrier/en/251.txt +15 -0
  1538. data/data/libphonenumber/resources/carrier/en/252.txt +22 -0
  1539. data/data/libphonenumber/resources/carrier/en/253.txt +17 -0
  1540. data/data/libphonenumber/resources/carrier/en/254.txt +44 -0
  1541. data/data/libphonenumber/resources/carrier/en/255.txt +21 -0
  1542. data/data/libphonenumber/resources/carrier/en/256.txt +26 -0
  1543. data/data/libphonenumber/resources/carrier/en/257.txt +25 -0
  1544. data/data/libphonenumber/resources/carrier/en/258.txt +18 -0
  1545. data/data/libphonenumber/resources/carrier/en/260.txt +17 -0
  1546. data/data/libphonenumber/resources/carrier/en/261.txt +18 -0
  1547. data/data/libphonenumber/resources/carrier/en/263.txt +17 -0
  1548. data/data/libphonenumber/resources/carrier/en/265.txt +16 -0
  1549. data/data/libphonenumber/resources/carrier/en/267.txt +54 -0
  1550. data/data/libphonenumber/resources/carrier/en/268.txt +15 -0
  1551. data/data/libphonenumber/resources/carrier/en/27.txt +70 -0
  1552. data/data/libphonenumber/resources/carrier/en/297.txt +29 -0
  1553. data/data/libphonenumber/resources/carrier/en/298.txt +18 -0
  1554. data/data/libphonenumber/resources/carrier/en/299.txt +17 -0
  1555. data/data/libphonenumber/resources/carrier/en/30.txt +20 -0
  1556. data/data/libphonenumber/resources/carrier/en/31.txt +65 -0
  1557. data/data/libphonenumber/resources/carrier/en/32.txt +18 -0
  1558. data/data/libphonenumber/resources/carrier/en/33.txt +72 -0
  1559. data/data/libphonenumber/resources/carrier/en/350.txt +19 -0
  1560. data/data/libphonenumber/resources/carrier/en/351.txt +26 -0
  1561. data/data/libphonenumber/resources/carrier/en/352.txt +23 -0
  1562. data/data/libphonenumber/resources/carrier/en/353.txt +20 -0
  1563. data/data/libphonenumber/resources/carrier/en/354.txt +44 -0
  1564. data/data/libphonenumber/resources/carrier/en/355.txt +18 -0
  1565. data/data/libphonenumber/resources/carrier/en/356.txt +27 -0
  1566. data/data/libphonenumber/resources/carrier/en/357.txt +19 -0
  1567. data/data/libphonenumber/resources/carrier/en/358.txt +44 -0
  1568. data/data/libphonenumber/resources/carrier/en/359.txt +18 -0
  1569. data/data/libphonenumber/resources/carrier/en/36.txt +17 -0
  1570. data/data/libphonenumber/resources/carrier/en/370.txt +50 -0
  1571. data/data/libphonenumber/resources/carrier/en/372.txt +30 -0
  1572. data/data/libphonenumber/resources/carrier/en/373.txt +44 -0
  1573. data/data/libphonenumber/resources/carrier/en/374.txt +29 -0
  1574. data/data/libphonenumber/resources/carrier/en/375.txt +28 -0
  1575. data/data/libphonenumber/resources/carrier/en/376.txt +15 -0
  1576. data/data/libphonenumber/resources/carrier/en/380.txt +15 -0
  1577. data/data/libphonenumber/resources/carrier/en/381.txt +23 -0
  1578. data/data/libphonenumber/resources/carrier/en/385.txt +19 -0
  1579. data/data/libphonenumber/resources/carrier/en/386.txt +23 -0
  1580. data/data/libphonenumber/resources/carrier/en/387.txt +20 -0
  1581. data/data/libphonenumber/resources/carrier/en/389.txt +23 -0
  1582. data/data/libphonenumber/resources/carrier/en/39.txt +23 -0
  1583. data/data/libphonenumber/resources/carrier/en/40.txt +20 -0
  1584. data/data/libphonenumber/resources/carrier/en/41.txt +18 -0
  1585. data/data/libphonenumber/resources/carrier/en/420.txt +32 -0
  1586. data/data/libphonenumber/resources/carrier/en/421.txt +28 -0
  1587. data/data/libphonenumber/resources/carrier/en/43.txt +26 -0
  1588. data/data/libphonenumber/resources/carrier/en/45.txt +364 -0
  1589. data/data/libphonenumber/resources/carrier/en/47.txt +239 -0
  1590. data/data/libphonenumber/resources/carrier/en/48.txt +118 -0
  1591. data/data/libphonenumber/resources/carrier/en/49.txt +44 -0
  1592. data/data/libphonenumber/resources/carrier/en/501.txt +16 -0
  1593. data/data/libphonenumber/resources/carrier/en/505.txt +101 -0
  1594. data/data/libphonenumber/resources/carrier/en/506.txt +49 -0
  1595. data/data/libphonenumber/resources/carrier/en/507.txt +84 -0
  1596. data/data/libphonenumber/resources/carrier/en/51.txt +584 -0
  1597. data/data/libphonenumber/resources/carrier/en/53.txt +15 -0
  1598. data/data/libphonenumber/resources/carrier/en/54.txt +98 -0
  1599. data/data/libphonenumber/resources/carrier/en/55.txt +9479 -0
  1600. data/data/libphonenumber/resources/carrier/en/56.txt +538 -0
  1601. data/data/libphonenumber/resources/carrier/en/57.txt +38 -0
  1602. data/data/libphonenumber/resources/carrier/en/58.txt +18 -0
  1603. data/data/libphonenumber/resources/carrier/en/591.txt +51 -0
  1604. data/data/libphonenumber/resources/carrier/en/595.txt +19 -0
  1605. data/data/libphonenumber/resources/carrier/en/597.txt +33 -0
  1606. data/data/libphonenumber/resources/carrier/en/598.txt +25 -0
  1607. data/data/libphonenumber/resources/carrier/en/599.txt +47 -0
  1608. data/data/libphonenumber/resources/carrier/en/60.txt +113 -0
  1609. data/data/libphonenumber/resources/carrier/en/61.txt +92 -0
  1610. data/data/libphonenumber/resources/carrier/en/62.txt +701 -0
  1611. data/data/libphonenumber/resources/carrier/en/63.txt +53 -0
  1612. data/data/libphonenumber/resources/carrier/en/64.txt +22 -0
  1613. data/data/libphonenumber/resources/carrier/en/65.txt +403 -0
  1614. data/data/libphonenumber/resources/carrier/en/66.txt +47 -0
  1615. data/data/libphonenumber/resources/carrier/en/670.txt +16 -0
  1616. data/data/libphonenumber/resources/carrier/en/673.txt +22 -0
  1617. data/data/libphonenumber/resources/carrier/en/675.txt +29 -0
  1618. data/data/libphonenumber/resources/carrier/en/676.txt +39 -0
  1619. data/data/libphonenumber/resources/carrier/en/677.txt +38 -0
  1620. data/data/libphonenumber/resources/carrier/en/678.txt +31 -0
  1621. data/data/libphonenumber/resources/carrier/en/679.txt +23 -0
  1622. data/data/libphonenumber/resources/carrier/en/685.txt +17 -0
  1623. data/data/libphonenumber/resources/carrier/en/686.txt +20 -0
  1624. data/data/libphonenumber/resources/carrier/en/7.txt +24 -0
  1625. data/data/libphonenumber/resources/carrier/en/84.txt +24 -0
  1626. data/data/libphonenumber/resources/carrier/en/852.txt +282 -0
  1627. data/data/libphonenumber/resources/carrier/en/855.txt +34 -0
  1628. data/data/libphonenumber/resources/carrier/en/856.txt +18 -0
  1629. data/data/libphonenumber/resources/carrier/en/86.txt +43 -0
  1630. data/data/libphonenumber/resources/carrier/en/880.txt +20 -0
  1631. data/data/libphonenumber/resources/carrier/en/90.txt +26 -0
  1632. data/data/libphonenumber/resources/carrier/en/91.txt +1647 -0
  1633. data/data/libphonenumber/resources/carrier/en/92.txt +49 -0
  1634. data/data/libphonenumber/resources/carrier/en/93.txt +27 -0
  1635. data/data/libphonenumber/resources/carrier/en/94.txt +19 -0
  1636. data/data/libphonenumber/resources/carrier/en/95.txt +16 -0
  1637. data/data/libphonenumber/resources/carrier/en/960.txt +16 -0
  1638. data/data/libphonenumber/resources/carrier/en/961.txt +25 -0
  1639. data/data/libphonenumber/resources/carrier/en/962.txt +18 -0
  1640. data/data/libphonenumber/resources/carrier/en/964.txt +19 -0
  1641. data/data/libphonenumber/resources/carrier/en/965.txt +17 -0
  1642. data/data/libphonenumber/resources/carrier/en/966.txt +27 -0
  1643. data/data/libphonenumber/resources/carrier/en/967.txt +21 -0
  1644. data/data/libphonenumber/resources/carrier/en/968.txt +18 -0
  1645. data/data/libphonenumber/resources/carrier/en/970.txt +16 -0
  1646. data/data/libphonenumber/resources/carrier/en/971.txt +18 -0
  1647. data/data/libphonenumber/resources/carrier/en/972.txt +32 -0
  1648. data/data/libphonenumber/resources/carrier/en/973.txt +30 -0
  1649. data/data/libphonenumber/resources/carrier/en/974.txt +18 -0
  1650. data/data/libphonenumber/resources/carrier/en/975.txt +15 -0
  1651. data/data/libphonenumber/resources/carrier/en/977.txt +25 -0
  1652. data/data/libphonenumber/resources/carrier/en/98.txt +29 -0
  1653. data/data/libphonenumber/resources/carrier/en/992.txt +23 -0
  1654. data/data/libphonenumber/resources/carrier/en/993.txt +17 -0
  1655. data/data/libphonenumber/resources/carrier/en/994.txt +20 -0
  1656. data/data/libphonenumber/resources/carrier/en/995.txt +34 -0
  1657. data/data/libphonenumber/resources/carrier/en/996.txt +22 -0
  1658. data/data/libphonenumber/resources/carrier/en/998.txt +33 -0
  1659. data/data/libphonenumber/resources/carrier/ru/375.txt +28 -0
  1660. data/data/libphonenumber/resources/geocoding/am/374.txt +177 -0
  1661. data/data/libphonenumber/resources/geocoding/ar/82.txt +34 -0
  1662. data/data/libphonenumber/resources/geocoding/ar/966.txt +27 -0
  1663. data/data/libphonenumber/resources/geocoding/be/375.txt +144 -0
  1664. data/data/libphonenumber/resources/geocoding/bg/359.txt +2105 -0
  1665. data/data/libphonenumber/resources/geocoding/cs/82.txt +35 -0
  1666. data/data/libphonenumber/resources/geocoding/de/32.txt +59 -0
  1667. data/data/libphonenumber/resources/geocoding/de/352.txt +229 -0
  1668. data/data/libphonenumber/resources/geocoding/de/41.txt +37 -0
  1669. data/data/libphonenumber/resources/geocoding/de/43.txt +1037 -0
  1670. data/data/libphonenumber/resources/geocoding/de/49.txt +5219 -0
  1671. data/data/libphonenumber/resources/geocoding/el/30.txt +259 -0
  1672. data/data/libphonenumber/resources/geocoding/en/1.txt +36228 -0
  1673. data/data/libphonenumber/resources/geocoding/en/20.txt +45 -0
  1674. data/data/libphonenumber/resources/geocoding/en/212.txt +85 -0
  1675. data/data/libphonenumber/resources/geocoding/en/213.txt +30 -0
  1676. data/data/libphonenumber/resources/geocoding/en/216.txt +26 -0
  1677. data/data/libphonenumber/resources/geocoding/en/220.txt +59 -0
  1678. data/data/libphonenumber/resources/geocoding/en/221.txt +19 -0
  1679. data/data/libphonenumber/resources/geocoding/en/222.txt +28 -0
  1680. data/data/libphonenumber/resources/geocoding/en/224.txt +38 -0
  1681. data/data/libphonenumber/resources/geocoding/en/225.txt +28 -0
  1682. data/data/libphonenumber/resources/geocoding/en/226.txt +50 -0
  1683. data/data/libphonenumber/resources/geocoding/en/228.txt +24 -0
  1684. data/data/libphonenumber/resources/geocoding/en/229.txt +52 -0
  1685. data/data/libphonenumber/resources/geocoding/en/230.txt +25 -0
  1686. data/data/libphonenumber/resources/geocoding/en/232.txt +20 -0
  1687. data/data/libphonenumber/resources/geocoding/en/233.txt +86 -0
  1688. data/data/libphonenumber/resources/geocoding/en/234.txt +79 -0
  1689. data/data/libphonenumber/resources/geocoding/en/237.txt +125 -0
  1690. data/data/libphonenumber/resources/geocoding/en/238.txt +54 -0
  1691. data/data/libphonenumber/resources/geocoding/en/239.txt +35 -0
  1692. data/data/libphonenumber/resources/geocoding/en/241.txt +48 -0
  1693. data/data/libphonenumber/resources/geocoding/en/242.txt +23 -0
  1694. data/data/libphonenumber/resources/geocoding/en/243.txt +22 -0
  1695. data/data/libphonenumber/resources/geocoding/en/244.txt +54 -0
  1696. data/data/libphonenumber/resources/geocoding/en/245.txt +36 -0
  1697. data/data/libphonenumber/resources/geocoding/en/247.txt +27 -0
  1698. data/data/libphonenumber/resources/geocoding/en/249.txt +28 -0
  1699. data/data/libphonenumber/resources/geocoding/en/251.txt +385 -0
  1700. data/data/libphonenumber/resources/geocoding/en/252.txt +21 -0
  1701. data/data/libphonenumber/resources/geocoding/en/254.txt +46 -0
  1702. data/data/libphonenumber/resources/geocoding/en/256.txt +30 -0
  1703. data/data/libphonenumber/resources/geocoding/en/257.txt +28 -0
  1704. data/data/libphonenumber/resources/geocoding/en/258.txt +27 -0
  1705. data/data/libphonenumber/resources/geocoding/en/260.txt +26 -0
  1706. data/data/libphonenumber/resources/geocoding/en/261.txt +40 -0
  1707. data/data/libphonenumber/resources/geocoding/en/263.txt +116 -0
  1708. data/data/libphonenumber/resources/geocoding/en/264.txt +1046 -0
  1709. data/data/libphonenumber/resources/geocoding/en/266.txt +18 -0
  1710. data/data/libphonenumber/resources/geocoding/en/267.txt +35 -0
  1711. data/data/libphonenumber/resources/geocoding/en/268.txt +54 -0
  1712. data/data/libphonenumber/resources/geocoding/en/269.txt +32 -0
  1713. data/data/libphonenumber/resources/geocoding/en/27.txt +57 -0
  1714. data/data/libphonenumber/resources/geocoding/en/290.txt +24 -0
  1715. data/data/libphonenumber/resources/geocoding/en/299.txt +43 -0
  1716. data/data/libphonenumber/resources/geocoding/en/30.txt +261 -0
  1717. data/data/libphonenumber/resources/geocoding/en/31.txt +137 -0
  1718. data/data/libphonenumber/resources/geocoding/en/32.txt +59 -0
  1719. data/data/libphonenumber/resources/geocoding/en/33.txt +5592 -0
  1720. data/data/libphonenumber/resources/geocoding/en/34.txt +123 -0
  1721. data/data/libphonenumber/resources/geocoding/en/351.txt +67 -0
  1722. data/data/libphonenumber/resources/geocoding/en/352.txt +228 -0
  1723. data/data/libphonenumber/resources/geocoding/en/353.txt +71 -0
  1724. data/data/libphonenumber/resources/geocoding/en/354.txt +23 -0
  1725. data/data/libphonenumber/resources/geocoding/en/355.txt +188 -0
  1726. data/data/libphonenumber/resources/geocoding/en/358.txt +38 -0
  1727. data/data/libphonenumber/resources/geocoding/en/359.txt +2102 -0
  1728. data/data/libphonenumber/resources/geocoding/en/36.txt +70 -0
  1729. data/data/libphonenumber/resources/geocoding/en/370.txt +64 -0
  1730. data/data/libphonenumber/resources/geocoding/en/371.txt +53 -0
  1731. data/data/libphonenumber/resources/geocoding/en/372.txt +35 -0
  1732. data/data/libphonenumber/resources/geocoding/en/373.txt +62 -0
  1733. data/data/libphonenumber/resources/geocoding/en/374.txt +184 -0
  1734. data/data/libphonenumber/resources/geocoding/en/375.txt +142 -0
  1735. data/data/libphonenumber/resources/geocoding/en/381.txt +50 -0
  1736. data/data/libphonenumber/resources/geocoding/en/389.txt +28 -0
  1737. data/data/libphonenumber/resources/geocoding/en/39.txt +137 -0
  1738. data/data/libphonenumber/resources/geocoding/en/40.txt +98 -0
  1739. data/data/libphonenumber/resources/geocoding/en/41.txt +37 -0
  1740. data/data/libphonenumber/resources/geocoding/en/420.txt +37 -0
  1741. data/data/libphonenumber/resources/geocoding/en/421.txt +42 -0
  1742. data/data/libphonenumber/resources/geocoding/en/43.txt +1036 -0
  1743. data/data/libphonenumber/resources/geocoding/en/44.txt +852 -0
  1744. data/data/libphonenumber/resources/geocoding/en/46.txt +265 -0
  1745. data/data/libphonenumber/resources/geocoding/en/47.txt +49 -0
  1746. data/data/libphonenumber/resources/geocoding/en/48.txt +65 -0
  1747. data/data/libphonenumber/resources/geocoding/en/49.txt +5218 -0
  1748. data/data/libphonenumber/resources/geocoding/en/51.txt +42 -0
  1749. data/data/libphonenumber/resources/geocoding/en/53.txt +33 -0
  1750. data/data/libphonenumber/resources/geocoding/en/54.txt +236 -0
  1751. data/data/libphonenumber/resources/geocoding/en/55.txt +84 -0
  1752. data/data/libphonenumber/resources/geocoding/en/56.txt +40 -0
  1753. data/data/libphonenumber/resources/geocoding/en/57.txt +186 -0
  1754. data/data/libphonenumber/resources/geocoding/en/58.txt +73 -0
  1755. data/data/libphonenumber/resources/geocoding/en/599.txt +22 -0
  1756. data/data/libphonenumber/resources/geocoding/en/62.txt +324 -0
  1757. data/data/libphonenumber/resources/geocoding/en/66.txt +40 -0
  1758. data/data/libphonenumber/resources/geocoding/en/686.txt +50 -0
  1759. data/data/libphonenumber/resources/geocoding/en/7.txt +355 -0
  1760. data/data/libphonenumber/resources/geocoding/en/81.txt +1547 -0
  1761. data/data/libphonenumber/resources/geocoding/en/82.txt +35 -0
  1762. data/data/libphonenumber/resources/geocoding/en/84.txt +80 -0
  1763. data/data/libphonenumber/resources/geocoding/en/86.txt +145812 -0
  1764. data/data/libphonenumber/resources/geocoding/en/886.txt +30 -0
  1765. data/data/libphonenumber/resources/geocoding/en/90.txt +182 -0
  1766. data/data/libphonenumber/resources/geocoding/en/91.txt +2669 -0
  1767. data/data/libphonenumber/resources/geocoding/en/94.txt +46 -0
  1768. data/data/libphonenumber/resources/geocoding/en/962.txt +32 -0
  1769. data/data/libphonenumber/resources/geocoding/en/966.txt +29 -0
  1770. data/data/libphonenumber/resources/geocoding/en/98.txt +53 -0
  1771. data/data/libphonenumber/resources/geocoding/es/228.txt +23 -0
  1772. data/data/libphonenumber/resources/geocoding/es/230.txt +23 -0
  1773. data/data/libphonenumber/resources/geocoding/es/34.txt +124 -0
  1774. data/data/libphonenumber/resources/geocoding/es/54.txt +238 -0
  1775. data/data/libphonenumber/resources/geocoding/es/56.txt +42 -0
  1776. data/data/libphonenumber/resources/geocoding/es/57.txt +186 -0
  1777. data/data/libphonenumber/resources/geocoding/es/58.txt +72 -0
  1778. data/data/libphonenumber/resources/geocoding/fa/98.txt +50 -0
  1779. data/data/libphonenumber/resources/geocoding/fi/358.txt +39 -0
  1780. data/data/libphonenumber/resources/geocoding/fr/212.txt +84 -0
  1781. data/data/libphonenumber/resources/geocoding/fr/222.txt +29 -0
  1782. data/data/libphonenumber/resources/geocoding/fr/225.txt +30 -0
  1783. data/data/libphonenumber/resources/geocoding/fr/228.txt +24 -0
  1784. data/data/libphonenumber/resources/geocoding/fr/229.txt +55 -0
  1785. data/data/libphonenumber/resources/geocoding/fr/230.txt +23 -0
  1786. data/data/libphonenumber/resources/geocoding/fr/242.txt +25 -0
  1787. data/data/libphonenumber/resources/geocoding/fr/243.txt +24 -0
  1788. data/data/libphonenumber/resources/geocoding/fr/269.txt +34 -0
  1789. data/data/libphonenumber/resources/geocoding/fr/290.txt +24 -0
  1790. data/data/libphonenumber/resources/geocoding/fr/32.txt +59 -0
  1791. data/data/libphonenumber/resources/geocoding/fr/33.txt +5593 -0
  1792. data/data/libphonenumber/resources/geocoding/fr/352.txt +231 -0
  1793. data/data/libphonenumber/resources/geocoding/fr/41.txt +37 -0
  1794. data/data/libphonenumber/resources/geocoding/fr/82.txt +33 -0
  1795. data/data/libphonenumber/resources/geocoding/hu/36.txt +71 -0
  1796. data/data/libphonenumber/resources/geocoding/id/62.txt +325 -0
  1797. data/data/libphonenumber/resources/geocoding/it/39.txt +248 -0
  1798. data/data/libphonenumber/resources/geocoding/it/41.txt +37 -0
  1799. data/data/libphonenumber/resources/geocoding/ja/81.txt +1546 -0
  1800. data/data/libphonenumber/resources/geocoding/ko/82.txt +35 -0
  1801. data/data/libphonenumber/resources/geocoding/nl/31.txt +145 -0
  1802. data/data/libphonenumber/resources/geocoding/nl/32.txt +59 -0
  1803. data/data/libphonenumber/resources/geocoding/pl/48.txt +66 -0
  1804. data/data/libphonenumber/resources/geocoding/pt/238.txt +58 -0
  1805. data/data/libphonenumber/resources/geocoding/pt/239.txt +37 -0
  1806. data/data/libphonenumber/resources/geocoding/pt/244.txt +59 -0
  1807. data/data/libphonenumber/resources/geocoding/pt/245.txt +37 -0
  1808. data/data/libphonenumber/resources/geocoding/pt/258.txt +29 -0
  1809. data/data/libphonenumber/resources/geocoding/pt/351.txt +69 -0
  1810. data/data/libphonenumber/resources/geocoding/pt/55.txt +86 -0
  1811. data/data/libphonenumber/resources/geocoding/ro/373.txt +61 -0
  1812. data/data/libphonenumber/resources/geocoding/ro/40.txt +99 -0
  1813. data/data/libphonenumber/resources/geocoding/ru/373.txt +61 -0
  1814. data/data/libphonenumber/resources/geocoding/ru/374.txt +177 -0
  1815. data/data/libphonenumber/resources/geocoding/ru/375.txt +143 -0
  1816. data/data/libphonenumber/resources/geocoding/ru/7.txt +108 -0
  1817. data/data/libphonenumber/resources/geocoding/se/358.txt +38 -0
  1818. data/data/libphonenumber/resources/geocoding/sr/381.txt +51 -0
  1819. data/data/libphonenumber/resources/geocoding/sv/46.txt +266 -0
  1820. data/data/libphonenumber/resources/geocoding/th/66.txt +39 -0
  1821. data/data/libphonenumber/resources/geocoding/tr/90.txt +182 -0
  1822. data/data/libphonenumber/resources/geocoding/vi/84.txt +80 -0
  1823. data/data/libphonenumber/resources/geocoding/zh/82.txt +35 -0
  1824. data/data/libphonenumber/resources/geocoding/zh/86.txt +145812 -0
  1825. data/data/libphonenumber/resources/geocoding/zh/886.txt +30 -0
  1826. data/data/libphonenumber/resources/geocoding/zh_Hant/82.txt +35 -0
  1827. data/data/libphonenumber/resources/geocoding/zh_Hant/886.txt +30 -0
  1828. data/data/libphonenumber/resources/phonemetadata.proto +282 -0
  1829. data/data/libphonenumber/resources/phonenumber.proto +123 -0
  1830. data/data/libphonenumber/resources/test/carrier/en/1.txt +16 -0
  1831. data/data/libphonenumber/resources/test/carrier/en/244.txt +16 -0
  1832. data/data/libphonenumber/resources/test/carrier/en/44.txt +17 -0
  1833. data/data/libphonenumber/resources/test/carrier/sv/44.txt +15 -0
  1834. data/data/libphonenumber/resources/test/geocoding/de/1.txt +16 -0
  1835. data/data/libphonenumber/resources/test/geocoding/en/1.txt +21 -0
  1836. data/data/libphonenumber/resources/test/geocoding/en/54.txt +15 -0
  1837. data/data/libphonenumber/resources/test/geocoding/en/82.txt +30 -0
  1838. data/data/libphonenumber/resources/test/geocoding/ko/82.txt +29 -0
  1839. data/data/libphonenumber/resources/test/timezones/map_data.txt +24 -0
  1840. data/data/libphonenumber/resources/timezones/map_data.txt +1996 -0
  1841. data/data/libphonenumber/tools/cpp/CMakeLists.txt +57 -0
  1842. data/data/libphonenumber/tools/cpp/gtest.cmake +47 -0
  1843. data/data/libphonenumber/tools/cpp/src/base/basictypes.h +312 -0
  1844. data/data/libphonenumber/tools/cpp/src/cpp-build/generate_geocoding_data.cc +654 -0
  1845. data/data/libphonenumber/tools/cpp/src/cpp-build/generate_geocoding_data.h +37 -0
  1846. data/data/libphonenumber/tools/cpp/src/cpp-build/generate_geocoding_data_main.cc +21 -0
  1847. data/data/libphonenumber/tools/cpp/test/cpp-build/generate_geocoding_data_test.cc +39 -0
  1848. data/data/libphonenumber/tools/cpp/test/cpp-build/run_tests.cc +21 -0
  1849. data/data/libphonenumber/tools/java/common/pom.xml +61 -0
  1850. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java +514 -0
  1851. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/Command.java +51 -0
  1852. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/CommandDispatcher.java +78 -0
  1853. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/CopyrightNotice.java +66 -0
  1854. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/FileUtils.java +52 -0
  1855. data/data/libphonenumber/tools/java/common/test/com/google/i18n/phonenumbers/BuildMetadataFromXmlTest.java +657 -0
  1856. data/data/libphonenumber/tools/java/cpp-build/pom.xml +149 -0
  1857. data/data/libphonenumber/tools/java/cpp-build/src/com/google/i18n/phonenumbers/BuildMetadataCppFromXml.java +219 -0
  1858. data/data/libphonenumber/tools/java/cpp-build/src/com/google/i18n/phonenumbers/CppMetadataGenerator.java +197 -0
  1859. data/data/libphonenumber/tools/java/cpp-build/src/com/google/i18n/phonenumbers/EntryPoint.java +33 -0
  1860. data/data/libphonenumber/tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar +0 -0
  1861. data/data/libphonenumber/tools/java/cpp-build/test/com/google/i18n/phonenumbers/BuildMetadataCppFromXmlTest.java +185 -0
  1862. data/data/libphonenumber/tools/java/cpp-build/test/com/google/i18n/phonenumbers/CppMetadataGeneratorTest.java +122 -0
  1863. data/data/libphonenumber/tools/java/data/README +16 -0
  1864. data/data/libphonenumber/tools/java/data/pom.xml +111 -0
  1865. data/data/libphonenumber/tools/java/data/src/com/google/i18n/phonenumbers/CombineGeoData.java +287 -0
  1866. data/data/libphonenumber/tools/java/data/src/com/google/i18n/phonenumbers/CombineGeoDataServlet.java +46 -0
  1867. data/data/libphonenumber/tools/java/data/test/com/google/i18n/phonenumbers/CombineGeoDataTest.java +233 -0
  1868. data/data/libphonenumber/tools/java/data/webapp/WEB-INF/appengine-web.xml +8 -0
  1869. data/data/libphonenumber/tools/java/data/webapp/WEB-INF/logging.properties +13 -0
  1870. data/data/libphonenumber/tools/java/data/webapp/WEB-INF/web.xml +18 -0
  1871. data/data/libphonenumber/tools/java/data/webapp/index.html +22 -0
  1872. data/data/libphonenumber/tools/java/java-build/pom.xml +113 -0
  1873. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/BuildMetadataJsonFromXml.java +389 -0
  1874. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/BuildMetadataProtoFromXml.java +349 -0
  1875. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/EntryPoint.java +39 -0
  1876. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/JSArrayBuilder.java +142 -0
  1877. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/AbstractPhonePrefixDataIOHandler.java +62 -0
  1878. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/GeneratePhonePrefixData.java +483 -0
  1879. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/GeneratePhonePrefixDataEntryPoint.java +58 -0
  1880. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/GenerateTimeZonesMapData.java +143 -0
  1881. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/GenerateTimeZonesMapDataEntryPoint.java +60 -0
  1882. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/PhonePrefixDataIOHandler.java +59 -0
  1883. data/data/libphonenumber/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar +0 -0
  1884. data/data/libphonenumber/tools/java/java-build/test/com/google/i18n/phonenumbers/buildtools/GeneratePhonePrefixDataTest.java +291 -0
  1885. data/data/libphonenumber/tools/java/java-build/test/com/google/i18n/phonenumbers/buildtools/GenerateTimeZonesMapDataTest.java +136 -0
  1886. data/data/libphonenumber/tools/java/pom.xml +29 -0
  1887. data/data/libphonenumber/tools/script/continuous-integration.sh +96 -0
  1888. data/data/phone_data.dat +0 -0
  1889. data/lib/phonelib/core.rb +36 -1
  1890. data/lib/phonelib/data_importer.rb +268 -0
  1891. data/lib/phonelib/phone.rb +67 -0
  1892. data/lib/phonelib/version.rb +1 -1
  1893. data/lib/tasks/phonelib_tasks.rake +2 -70
  1894. metadata +1892 -7
@@ -0,0 +1,3915 @@
1
+ // Copyright (C) 2009 The Libphonenumber Authors
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // Author: Shaopeng Jia
16
+ // Author: Lara Rennie
17
+ // Open-sourced by: Philippe Liard
18
+ //
19
+ // Note that these tests use the metadata contained in the test metadata file,
20
+ // not the normal metadata file, so should not be used for regression test
21
+ // purposes - these tests are illustrative only and test functionality.
22
+
23
+ #include "phonenumbers/phonenumberutil.h"
24
+
25
+ #include <algorithm>
26
+ #include <iostream>
27
+ #include <list>
28
+ #include <set>
29
+ #include <string>
30
+
31
+ #include <gtest/gtest.h>
32
+
33
+ #include "phonenumbers/default_logger.h"
34
+ #include "phonenumbers/phonemetadata.pb.h"
35
+ #include "phonenumbers/phonenumber.h"
36
+ #include "phonenumbers/phonenumber.pb.h"
37
+ #include "phonenumbers/test_util.h"
38
+
39
+ namespace i18n {
40
+ namespace phonenumbers {
41
+
42
+ using std::endl;
43
+ using std::find;
44
+ using std::make_pair;
45
+ using std::ostream;
46
+
47
+ using google::protobuf::RepeatedPtrField;
48
+
49
+ static const int kInvalidCountryCode = 2;
50
+
51
+ class PhoneNumberUtilTest : public testing::Test {
52
+ protected:
53
+ PhoneNumberUtilTest() : phone_util_(*PhoneNumberUtil::GetInstance()) {
54
+ PhoneNumberUtil::GetInstance()->SetLogger(new StdoutLogger());
55
+ }
56
+
57
+ // Wrapper functions for private functions that we want to test.
58
+ const PhoneMetadata* GetPhoneMetadata(const string& region_code) const {
59
+ return phone_util_.GetMetadataForRegion(region_code);
60
+ }
61
+
62
+ const PhoneMetadata* GetMetadataForNonGeographicalRegion(
63
+ int country_code) const {
64
+ return phone_util_.GetMetadataForNonGeographicalRegion(country_code);
65
+ }
66
+
67
+ void GetSupportedRegions(set<string>* regions) {
68
+ phone_util_.GetSupportedRegions(regions);
69
+ }
70
+
71
+ void GetRegionCodesForCountryCallingCode(
72
+ int country_calling_code,
73
+ list<string>* regions) {
74
+ phone_util_.GetRegionCodesForCountryCallingCode(country_calling_code,
75
+ regions);
76
+ }
77
+
78
+ void ExtractPossibleNumber(const string& number,
79
+ string* extracted_number) const {
80
+ phone_util_.ExtractPossibleNumber(number, extracted_number);
81
+ }
82
+
83
+ bool CanBeInternationallyDialled(const PhoneNumber& number) const {
84
+ return phone_util_.CanBeInternationallyDialled(number);
85
+ }
86
+
87
+ bool IsViablePhoneNumber(const string& number) const {
88
+ return phone_util_.IsViablePhoneNumber(number);
89
+ }
90
+
91
+ void Normalize(string* number) const {
92
+ phone_util_.Normalize(number);
93
+ }
94
+
95
+ void NormalizeDiallableCharsOnly(string* number) const {
96
+ phone_util_.NormalizeDiallableCharsOnly(number);
97
+ }
98
+
99
+ bool IsNumberGeographical(const PhoneNumber& phone_number) const {
100
+ return phone_util_.IsNumberGeographical(phone_number);
101
+ }
102
+
103
+ bool IsLeadingZeroPossible(int country_calling_code) const {
104
+ return phone_util_.IsLeadingZeroPossible(country_calling_code);
105
+ }
106
+
107
+ PhoneNumber::CountryCodeSource MaybeStripInternationalPrefixAndNormalize(
108
+ const string& possible_idd_prefix,
109
+ string* number) const {
110
+ return phone_util_.MaybeStripInternationalPrefixAndNormalize(
111
+ possible_idd_prefix,
112
+ number);
113
+ }
114
+
115
+ void MaybeStripNationalPrefixAndCarrierCode(const PhoneMetadata& metadata,
116
+ string* number,
117
+ string* carrier_code) const {
118
+ phone_util_.MaybeStripNationalPrefixAndCarrierCode(metadata, number,
119
+ carrier_code);
120
+ }
121
+
122
+ bool MaybeStripExtension(string* number, string* extension) const {
123
+ return phone_util_.MaybeStripExtension(number, extension);
124
+ }
125
+
126
+ PhoneNumberUtil::ErrorType MaybeExtractCountryCode(
127
+ const PhoneMetadata* default_region_metadata,
128
+ bool keep_raw_input,
129
+ string* national_number,
130
+ PhoneNumber* phone_number) const {
131
+ return phone_util_.MaybeExtractCountryCode(default_region_metadata,
132
+ keep_raw_input,
133
+ national_number,
134
+ phone_number);
135
+ }
136
+
137
+ static bool Equals(const PhoneNumberDesc& expected_number,
138
+ const PhoneNumberDesc& actual_number) {
139
+ return ExactlySameAs(expected_number, actual_number);
140
+ }
141
+
142
+ bool ContainsOnlyValidDigits(const string& s) const {
143
+ return phone_util_.ContainsOnlyValidDigits(s);
144
+ }
145
+
146
+ void GetNddPrefixForRegion(const string& region,
147
+ bool strip_non_digits,
148
+ string* ndd_prefix) const {
149
+ // For testing purposes, we check this is empty first.
150
+ ndd_prefix->clear();
151
+ phone_util_.GetNddPrefixForRegion(region, strip_non_digits, ndd_prefix);
152
+ }
153
+
154
+ const PhoneNumberUtil& phone_util_;
155
+
156
+ private:
157
+ DISALLOW_COPY_AND_ASSIGN(PhoneNumberUtilTest);
158
+ };
159
+
160
+ TEST_F(PhoneNumberUtilTest, ContainsOnlyValidDigits) {
161
+ EXPECT_TRUE(ContainsOnlyValidDigits(""));
162
+ EXPECT_TRUE(ContainsOnlyValidDigits("2"));
163
+ EXPECT_TRUE(ContainsOnlyValidDigits("25"));
164
+ EXPECT_TRUE(ContainsOnlyValidDigits("\xEF\xBC\x96" /* "6" */));
165
+ EXPECT_FALSE(ContainsOnlyValidDigits("a"));
166
+ EXPECT_FALSE(ContainsOnlyValidDigits("2a"));
167
+ }
168
+
169
+ TEST_F(PhoneNumberUtilTest, GetSupportedRegions) {
170
+ set<string> regions;
171
+
172
+ GetSupportedRegions(&regions);
173
+ EXPECT_GT(regions.size(), 0U);
174
+ }
175
+
176
+ TEST_F(PhoneNumberUtilTest, GetSupportedGlobalNetworkCallingCodes) {
177
+ set<int> calling_codes;
178
+
179
+ phone_util_.GetSupportedGlobalNetworkCallingCodes(&calling_codes);
180
+ EXPECT_GT(calling_codes.size(), 0U);
181
+ for (set<int>::const_iterator it = calling_codes.begin();
182
+ it != calling_codes.end(); ++it) {
183
+ EXPECT_GT(*it, 0);
184
+ string region_code;
185
+ phone_util_.GetRegionCodeForCountryCode(*it, &region_code);
186
+ EXPECT_EQ(RegionCode::UN001(), region_code);
187
+ }
188
+ }
189
+
190
+ TEST_F(PhoneNumberUtilTest, GetRegionCodesForCountryCallingCode) {
191
+ list<string> regions;
192
+
193
+ GetRegionCodesForCountryCallingCode(1, &regions);
194
+ EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::US())
195
+ != regions.end());
196
+ EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::BS())
197
+ != regions.end());
198
+
199
+ regions.clear();
200
+ GetRegionCodesForCountryCallingCode(44, &regions);
201
+ EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::GB())
202
+ != regions.end());
203
+
204
+ regions.clear();
205
+ GetRegionCodesForCountryCallingCode(49, &regions);
206
+ EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::DE())
207
+ != regions.end());
208
+
209
+ regions.clear();
210
+ GetRegionCodesForCountryCallingCode(800, &regions);
211
+ EXPECT_TRUE(find(regions.begin(), regions.end(), RegionCode::UN001())
212
+ != regions.end());
213
+
214
+ regions.clear();
215
+ GetRegionCodesForCountryCallingCode(kInvalidCountryCode, &regions);
216
+ EXPECT_TRUE(regions.empty());
217
+ }
218
+
219
+ TEST_F(PhoneNumberUtilTest, GetInstanceLoadUSMetadata) {
220
+ const PhoneMetadata* metadata = GetPhoneMetadata(RegionCode::US());
221
+ EXPECT_EQ("US", metadata->id());
222
+ EXPECT_EQ(1, metadata->country_code());
223
+ EXPECT_EQ("011", metadata->international_prefix());
224
+ EXPECT_TRUE(metadata->has_national_prefix());
225
+ ASSERT_EQ(2, metadata->number_format_size());
226
+ EXPECT_EQ("(\\d{3})(\\d{3})(\\d{4})",
227
+ metadata->number_format(1).pattern());
228
+ EXPECT_EQ("$1 $2 $3", metadata->number_format(1).format());
229
+ EXPECT_EQ("[13-689]\\d{9}|2[0-35-9]\\d{8}",
230
+ metadata->general_desc().national_number_pattern());
231
+ EXPECT_EQ("\\d{7}(?:\\d{3})?",
232
+ metadata->general_desc().possible_number_pattern());
233
+ EXPECT_TRUE(Equals(metadata->general_desc(), metadata->fixed_line()));
234
+ EXPECT_EQ("\\d{10}", metadata->toll_free().possible_number_pattern());
235
+ EXPECT_EQ("900\\d{7}", metadata->premium_rate().national_number_pattern());
236
+ // No shared-cost data is available, so it should be initialised to "NA".
237
+ EXPECT_EQ("NA", metadata->shared_cost().national_number_pattern());
238
+ EXPECT_EQ("NA", metadata->shared_cost().possible_number_pattern());
239
+ }
240
+
241
+ TEST_F(PhoneNumberUtilTest, GetInstanceLoadDEMetadata) {
242
+ const PhoneMetadata* metadata = GetPhoneMetadata(RegionCode::DE());
243
+ EXPECT_EQ("DE", metadata->id());
244
+ EXPECT_EQ(49, metadata->country_code());
245
+ EXPECT_EQ("00", metadata->international_prefix());
246
+ EXPECT_EQ("0", metadata->national_prefix());
247
+ ASSERT_EQ(6, metadata->number_format_size());
248
+ EXPECT_EQ(1, metadata->number_format(5).leading_digits_pattern_size());
249
+ EXPECT_EQ("900", metadata->number_format(5).leading_digits_pattern(0));
250
+ EXPECT_EQ("(\\d{3})(\\d{3,4})(\\d{4})",
251
+ metadata->number_format(5).pattern());
252
+ EXPECT_EQ("$1 $2 $3", metadata->number_format(5).format());
253
+ EXPECT_EQ("(?:[24-6]\\d{2}|3[03-9]\\d|[789](?:[1-9]\\d|0[2-9]))\\d{1,8}",
254
+ metadata->fixed_line().national_number_pattern());
255
+ EXPECT_EQ("\\d{2,14}", metadata->fixed_line().possible_number_pattern());
256
+ EXPECT_EQ("30123456", metadata->fixed_line().example_number());
257
+ EXPECT_EQ("\\d{10}", metadata->toll_free().possible_number_pattern());
258
+ EXPECT_EQ("900([135]\\d{6}|9\\d{7})",
259
+ metadata->premium_rate().national_number_pattern());
260
+ }
261
+
262
+ TEST_F(PhoneNumberUtilTest, GetInstanceLoadARMetadata) {
263
+ const PhoneMetadata* metadata = GetPhoneMetadata(RegionCode::AR());
264
+ EXPECT_EQ("AR", metadata->id());
265
+ EXPECT_EQ(54, metadata->country_code());
266
+ EXPECT_EQ("00", metadata->international_prefix());
267
+ EXPECT_EQ("0", metadata->national_prefix());
268
+ EXPECT_EQ("0(?:(11|343|3715)15)?", metadata->national_prefix_for_parsing());
269
+ EXPECT_EQ("9$1", metadata->national_prefix_transform_rule());
270
+ ASSERT_EQ(5, metadata->number_format_size());
271
+ EXPECT_EQ("$2 15 $3-$4", metadata->number_format(2).format());
272
+ EXPECT_EQ("(9)(\\d{4})(\\d{2})(\\d{4})",
273
+ metadata->number_format(3).pattern());
274
+ EXPECT_EQ("(9)(\\d{4})(\\d{2})(\\d{4})",
275
+ metadata->intl_number_format(3).pattern());
276
+ EXPECT_EQ("$1 $2 $3 $4", metadata->intl_number_format(3).format());
277
+ }
278
+
279
+ TEST_F(PhoneNumberUtilTest, GetInstanceLoadInternationalTollFreeMetadata) {
280
+ const PhoneMetadata* metadata = GetMetadataForNonGeographicalRegion(800);
281
+ EXPECT_FALSE(metadata == NULL);
282
+ EXPECT_EQ("001", metadata->id());
283
+ EXPECT_EQ(800, metadata->country_code());
284
+ EXPECT_EQ("$1 $2", metadata->number_format(0).format());
285
+ EXPECT_EQ("(\\d{4})(\\d{4})", metadata->number_format(0).pattern());
286
+ EXPECT_EQ("12345678", metadata->general_desc().example_number());
287
+ EXPECT_EQ("12345678", metadata->toll_free().example_number());
288
+ }
289
+
290
+ TEST_F(PhoneNumberUtilTest, GetNationalSignificantNumber) {
291
+ PhoneNumber number;
292
+ number.set_country_code(1);
293
+ number.set_national_number(6502530000ULL);
294
+ string national_significant_number;
295
+ phone_util_.GetNationalSignificantNumber(number,
296
+ &national_significant_number);
297
+ EXPECT_EQ("6502530000", national_significant_number);
298
+
299
+ // An Italian mobile number.
300
+ national_significant_number.clear();
301
+ number.set_country_code(39);
302
+ number.set_national_number(312345678ULL);
303
+ phone_util_.GetNationalSignificantNumber(number,
304
+ &national_significant_number);
305
+ EXPECT_EQ("312345678", national_significant_number);
306
+
307
+ // An Italian fixed line number.
308
+ national_significant_number.clear();
309
+ number.set_country_code(39);
310
+ number.set_national_number(236618300ULL);
311
+ number.set_italian_leading_zero(true);
312
+ phone_util_.GetNationalSignificantNumber(number,
313
+ &national_significant_number);
314
+ EXPECT_EQ("0236618300", national_significant_number);
315
+
316
+ national_significant_number.clear();
317
+ number.Clear();
318
+ number.set_country_code(800);
319
+ number.set_national_number(12345678ULL);
320
+ phone_util_.GetNationalSignificantNumber(number,
321
+ &national_significant_number);
322
+ EXPECT_EQ("12345678", national_significant_number);
323
+ }
324
+
325
+ TEST_F(PhoneNumberUtilTest, GetExampleNumber) {
326
+ PhoneNumber de_number;
327
+ de_number.set_country_code(49);
328
+ de_number.set_national_number(30123456ULL);
329
+ PhoneNumber test_number;
330
+ bool success = phone_util_.GetExampleNumber(RegionCode::DE(), &test_number);
331
+ EXPECT_TRUE(success);
332
+ EXPECT_EQ(de_number, test_number);
333
+
334
+ success = phone_util_.GetExampleNumberForType(RegionCode::DE(),
335
+ PhoneNumberUtil::FIXED_LINE,
336
+ &test_number);
337
+ EXPECT_TRUE(success);
338
+ EXPECT_EQ(de_number, test_number);
339
+
340
+ success = phone_util_.GetExampleNumberForType(RegionCode::DE(),
341
+ PhoneNumberUtil::MOBILE,
342
+ &test_number);
343
+ // Here we test that an example number was not returned, and that the number
344
+ // passed in was not modified.
345
+ test_number.Clear();
346
+ EXPECT_FALSE(success);
347
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
348
+
349
+ // For the US, the example number is placed under general description, and
350
+ // hence should be used for both fixed line and mobile, so neither of these
351
+ // should return null.
352
+ success = phone_util_.GetExampleNumberForType(RegionCode::US(),
353
+ PhoneNumberUtil::FIXED_LINE,
354
+ &test_number);
355
+ // Here we test that the call to get an example number succeeded, and that the
356
+ // number passed in was modified.
357
+ EXPECT_TRUE(success);
358
+ EXPECT_NE(PhoneNumber::default_instance(), test_number);
359
+ success = phone_util_.GetExampleNumberForType(RegionCode::US(),
360
+ PhoneNumberUtil::MOBILE,
361
+ &test_number);
362
+ EXPECT_TRUE(success);
363
+ EXPECT_NE(PhoneNumber::default_instance(), test_number);
364
+
365
+ // CS is an invalid region, so we have no data for it. We should return false.
366
+ test_number.Clear();
367
+ EXPECT_FALSE(phone_util_.GetExampleNumberForType(RegionCode::CS(),
368
+ PhoneNumberUtil::MOBILE,
369
+ &test_number));
370
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
371
+
372
+ // RegionCode 001 is reserved for supporting non-geographical country calling
373
+ // code. We don't support getting an example number for it with this method.
374
+ EXPECT_FALSE(phone_util_.GetExampleNumber(RegionCode::UN001(), &test_number));
375
+ }
376
+
377
+ TEST_F(PhoneNumberUtilTest, GetExampleNumberForNonGeoEntity) {
378
+ PhoneNumber toll_free_number;
379
+ toll_free_number.set_country_code(800);
380
+ toll_free_number.set_national_number(12345678ULL);
381
+ PhoneNumber test_number;
382
+ bool success =
383
+ phone_util_.GetExampleNumberForNonGeoEntity(800 , &test_number);
384
+ EXPECT_TRUE(success);
385
+ EXPECT_EQ(toll_free_number, test_number);
386
+
387
+ PhoneNumber universal_premium_rate;
388
+ universal_premium_rate.set_country_code(979);
389
+ universal_premium_rate.set_national_number(123456789ULL);
390
+ success = phone_util_.GetExampleNumberForNonGeoEntity(979 , &test_number);
391
+ EXPECT_TRUE(success);
392
+ EXPECT_EQ(universal_premium_rate, test_number);
393
+ }
394
+
395
+ TEST_F(PhoneNumberUtilTest, FormatUSNumber) {
396
+ PhoneNumber test_number;
397
+ string formatted_number;
398
+ test_number.set_country_code(1);
399
+ test_number.set_national_number(6502530000ULL);
400
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
401
+ EXPECT_EQ("650 253 0000", formatted_number);
402
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
403
+ &formatted_number);
404
+ EXPECT_EQ("+1 650 253 0000", formatted_number);
405
+
406
+ test_number.set_national_number(8002530000ULL);
407
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
408
+ EXPECT_EQ("800 253 0000", formatted_number);
409
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
410
+ &formatted_number);
411
+ EXPECT_EQ("+1 800 253 0000", formatted_number);
412
+
413
+ test_number.set_national_number(9002530000ULL);
414
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
415
+ EXPECT_EQ("900 253 0000", formatted_number);
416
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
417
+ &formatted_number);
418
+ EXPECT_EQ("+1 900 253 0000", formatted_number);
419
+ phone_util_.Format(test_number, PhoneNumberUtil::RFC3966, &formatted_number);
420
+ EXPECT_EQ("tel:+1-900-253-0000", formatted_number);
421
+ test_number.set_national_number(0ULL);
422
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
423
+ EXPECT_EQ("0", formatted_number);
424
+ // Numbers with all zeros in the national number part will be formatted by
425
+ // using the raw_input if that is available no matter which format is
426
+ // specified.
427
+ test_number.set_raw_input("000-000-0000");
428
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
429
+ EXPECT_EQ("000-000-0000", formatted_number);
430
+ }
431
+
432
+ TEST_F(PhoneNumberUtilTest, FormatBSNumber) {
433
+ PhoneNumber test_number;
434
+ string formatted_number;
435
+ test_number.set_country_code(1);
436
+ test_number.set_national_number(2421234567ULL);
437
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
438
+ EXPECT_EQ("242 123 4567", formatted_number);
439
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
440
+ &formatted_number);
441
+ EXPECT_EQ("+1 242 123 4567", formatted_number);
442
+
443
+ test_number.set_national_number(8002530000ULL);
444
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
445
+ EXPECT_EQ("800 253 0000", formatted_number);
446
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
447
+ &formatted_number);
448
+ EXPECT_EQ("+1 800 253 0000", formatted_number);
449
+
450
+ test_number.set_national_number(9002530000ULL);
451
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
452
+ EXPECT_EQ("900 253 0000", formatted_number);
453
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
454
+ &formatted_number);
455
+ EXPECT_EQ("+1 900 253 0000", formatted_number);
456
+ }
457
+
458
+ TEST_F(PhoneNumberUtilTest, FormatGBNumber) {
459
+ PhoneNumber test_number;
460
+ string formatted_number;
461
+ test_number.set_country_code(44);
462
+ test_number.set_national_number(2087389353ULL);
463
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
464
+ EXPECT_EQ("(020) 8738 9353", formatted_number);
465
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
466
+ &formatted_number);
467
+ EXPECT_EQ("+44 20 8738 9353", formatted_number);
468
+
469
+ test_number.set_national_number(7912345678ULL);
470
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
471
+ EXPECT_EQ("(07912) 345 678", formatted_number);
472
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
473
+ &formatted_number);
474
+ EXPECT_EQ("+44 7912 345 678", formatted_number);
475
+ }
476
+
477
+ TEST_F(PhoneNumberUtilTest, FormatDENumber) {
478
+ PhoneNumber test_number;
479
+ string formatted_number;
480
+ test_number.set_country_code(49);
481
+ test_number.set_national_number(301234ULL);
482
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
483
+ EXPECT_EQ("030/1234", formatted_number);
484
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
485
+ &formatted_number);
486
+ EXPECT_EQ("+49 30/1234", formatted_number);
487
+ phone_util_.Format(test_number, PhoneNumberUtil::RFC3966, &formatted_number);
488
+ EXPECT_EQ("tel:+49-30-1234", formatted_number);
489
+
490
+ test_number.set_national_number(291123ULL);
491
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
492
+ EXPECT_EQ("0291 123", formatted_number);
493
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
494
+ &formatted_number);
495
+ EXPECT_EQ("+49 291 123", formatted_number);
496
+
497
+ test_number.set_national_number(29112345678ULL);
498
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
499
+ EXPECT_EQ("0291 12345678", formatted_number);
500
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
501
+ &formatted_number);
502
+ EXPECT_EQ("+49 291 12345678", formatted_number);
503
+
504
+ test_number.set_national_number(9123123ULL);
505
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
506
+ EXPECT_EQ("09123 123", formatted_number);
507
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
508
+ &formatted_number);
509
+ EXPECT_EQ("+49 9123 123", formatted_number);
510
+
511
+ test_number.set_national_number(80212345ULL);
512
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
513
+ EXPECT_EQ("08021 2345", formatted_number);
514
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
515
+ &formatted_number);
516
+ EXPECT_EQ("+49 8021 2345", formatted_number);
517
+
518
+ test_number.set_national_number(1234ULL);
519
+ // Note this number is correctly formatted without national prefix. Most of
520
+ // the numbers that are treated as invalid numbers by the library are short
521
+ // numbers, and they are usually not dialed with national prefix.
522
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
523
+ EXPECT_EQ("1234", formatted_number);
524
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
525
+ &formatted_number);
526
+ EXPECT_EQ("+49 1234", formatted_number);
527
+ }
528
+
529
+ TEST_F(PhoneNumberUtilTest, FormatITNumber) {
530
+ PhoneNumber test_number;
531
+ string formatted_number;
532
+ test_number.set_country_code(39);
533
+ test_number.set_national_number(236618300ULL);
534
+ test_number.set_italian_leading_zero(true);
535
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
536
+ EXPECT_EQ("02 3661 8300", formatted_number);
537
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
538
+ &formatted_number);
539
+ EXPECT_EQ("+39 02 3661 8300", formatted_number);
540
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
541
+ &formatted_number);
542
+ EXPECT_EQ("+390236618300", formatted_number);
543
+
544
+ test_number.set_national_number(345678901ULL);
545
+ test_number.set_italian_leading_zero(false);
546
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
547
+ EXPECT_EQ("345 678 901", formatted_number);
548
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
549
+ &formatted_number);
550
+ EXPECT_EQ("+39 345 678 901", formatted_number);
551
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
552
+ &formatted_number);
553
+ EXPECT_EQ("+39345678901", formatted_number);
554
+ }
555
+
556
+ TEST_F(PhoneNumberUtilTest, FormatAUNumber) {
557
+ PhoneNumber test_number;
558
+ string formatted_number;
559
+ test_number.set_country_code(61);
560
+ test_number.set_national_number(236618300ULL);
561
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
562
+ EXPECT_EQ("02 3661 8300", formatted_number);
563
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
564
+ &formatted_number);
565
+ EXPECT_EQ("+61 2 3661 8300", formatted_number);
566
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
567
+ &formatted_number);
568
+ EXPECT_EQ("+61236618300", formatted_number);
569
+
570
+ test_number.set_national_number(1800123456ULL);
571
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
572
+ EXPECT_EQ("1800 123 456", formatted_number);
573
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
574
+ &formatted_number);
575
+ EXPECT_EQ("+61 1800 123 456", formatted_number);
576
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
577
+ &formatted_number);
578
+ EXPECT_EQ("+611800123456", formatted_number);
579
+ }
580
+
581
+ TEST_F(PhoneNumberUtilTest, FormatARNumber) {
582
+ PhoneNumber test_number;
583
+ string formatted_number;
584
+ test_number.set_country_code(54);
585
+ test_number.set_national_number(1187654321ULL);
586
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
587
+ EXPECT_EQ("011 8765-4321", formatted_number);
588
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
589
+ &formatted_number);
590
+ EXPECT_EQ("+54 11 8765-4321", formatted_number);
591
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
592
+ &formatted_number);
593
+ EXPECT_EQ("+541187654321", formatted_number);
594
+
595
+ test_number.set_national_number(91187654321ULL);
596
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
597
+ EXPECT_EQ("011 15 8765-4321", formatted_number);
598
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
599
+ &formatted_number);
600
+ EXPECT_EQ("+54 9 11 8765 4321", formatted_number);
601
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
602
+ &formatted_number);
603
+ EXPECT_EQ("+5491187654321", formatted_number);
604
+ }
605
+
606
+ TEST_F(PhoneNumberUtilTest, FormatMXNumber) {
607
+ PhoneNumber test_number;
608
+ string formatted_number;
609
+ test_number.set_country_code(52);
610
+ test_number.set_national_number(12345678900ULL);
611
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
612
+ EXPECT_EQ("045 234 567 8900", formatted_number);
613
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
614
+ &formatted_number);
615
+ EXPECT_EQ("+52 1 234 567 8900", formatted_number);
616
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
617
+ &formatted_number);
618
+ EXPECT_EQ("+5212345678900", formatted_number);
619
+
620
+ test_number.set_national_number(15512345678ULL);
621
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
622
+ EXPECT_EQ("045 55 1234 5678", formatted_number);
623
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
624
+ &formatted_number);
625
+ EXPECT_EQ("+52 1 55 1234 5678", formatted_number);
626
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
627
+ &formatted_number);
628
+ EXPECT_EQ("+5215512345678", formatted_number);
629
+
630
+ test_number.set_national_number(3312345678LL);
631
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
632
+ EXPECT_EQ("01 33 1234 5678", formatted_number);
633
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
634
+ &formatted_number);
635
+ EXPECT_EQ("+52 33 1234 5678", formatted_number);
636
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
637
+ &formatted_number);
638
+ EXPECT_EQ("+523312345678", formatted_number);
639
+
640
+ test_number.set_national_number(8211234567LL);
641
+ phone_util_.Format(test_number, PhoneNumberUtil::NATIONAL, &formatted_number);
642
+ EXPECT_EQ("01 821 123 4567", formatted_number);
643
+ phone_util_.Format(test_number, PhoneNumberUtil::INTERNATIONAL,
644
+ &formatted_number);
645
+ EXPECT_EQ("+52 821 123 4567", formatted_number);
646
+ phone_util_.Format(test_number, PhoneNumberUtil::E164,
647
+ &formatted_number);
648
+ EXPECT_EQ("+528211234567", formatted_number);
649
+ }
650
+
651
+ TEST_F(PhoneNumberUtilTest, FormatOutOfCountryCallingNumber) {
652
+ PhoneNumber test_number;
653
+ string formatted_number;
654
+ test_number.set_country_code(1);
655
+ test_number.set_national_number(9002530000ULL);
656
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::DE(),
657
+ &formatted_number);
658
+ EXPECT_EQ("00 1 900 253 0000", formatted_number);
659
+
660
+ test_number.set_national_number(6502530000ULL);
661
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::BS(),
662
+ &formatted_number);
663
+ EXPECT_EQ("1 650 253 0000", formatted_number);
664
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::PL(),
665
+ &formatted_number);
666
+ EXPECT_EQ("00 1 650 253 0000", formatted_number);
667
+
668
+ test_number.set_country_code(44);
669
+ test_number.set_national_number(7912345678ULL);
670
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
671
+ &formatted_number);
672
+ EXPECT_EQ("011 44 7912 345 678", formatted_number);
673
+
674
+ test_number.set_country_code(49);
675
+ test_number.set_national_number(1234ULL);
676
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::GB(),
677
+ &formatted_number);
678
+ EXPECT_EQ("00 49 1234", formatted_number);
679
+ // Note this number is correctly formatted without national prefix. Most of
680
+ // the numbers that are treated as invalid numbers by the library are short
681
+ // numbers, and they are usually not dialed with national prefix.
682
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::DE(),
683
+ &formatted_number);
684
+ EXPECT_EQ("1234", formatted_number);
685
+
686
+ test_number.set_country_code(39);
687
+ test_number.set_national_number(236618300ULL);
688
+ test_number.set_italian_leading_zero(true);
689
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
690
+ &formatted_number);
691
+ EXPECT_EQ("011 39 02 3661 8300", formatted_number);
692
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::IT(),
693
+ &formatted_number);
694
+ EXPECT_EQ("02 3661 8300", formatted_number);
695
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::SG(),
696
+ &formatted_number);
697
+ EXPECT_EQ("+39 02 3661 8300", formatted_number);
698
+
699
+ test_number.set_country_code(65);
700
+ test_number.set_national_number(94777892ULL);
701
+ test_number.set_italian_leading_zero(false);
702
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::SG(),
703
+ &formatted_number);
704
+ EXPECT_EQ("9477 7892", formatted_number);
705
+
706
+ test_number.set_country_code(800);
707
+ test_number.set_national_number(12345678ULL);
708
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
709
+ &formatted_number);
710
+ EXPECT_EQ("011 800 1234 5678", formatted_number);
711
+
712
+ test_number.set_country_code(54);
713
+ test_number.set_national_number(91187654321ULL);
714
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
715
+ &formatted_number);
716
+ EXPECT_EQ("011 54 9 11 8765 4321", formatted_number);
717
+
718
+ test_number.set_extension("1234");
719
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::US(),
720
+ &formatted_number);
721
+ EXPECT_EQ("011 54 9 11 8765 4321 ext. 1234", formatted_number);
722
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::AU(),
723
+ &formatted_number);
724
+ EXPECT_EQ("0011 54 9 11 8765 4321 ext. 1234", formatted_number);
725
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::AR(),
726
+ &formatted_number);
727
+ EXPECT_EQ("011 15 8765-4321 ext. 1234", formatted_number);
728
+ }
729
+
730
+ TEST_F(PhoneNumberUtilTest, FormatOutOfCountryWithInvalidRegion) {
731
+ PhoneNumber test_number;
732
+ string formatted_number;
733
+ test_number.set_country_code(1);
734
+ test_number.set_national_number(6502530000ULL);
735
+ // AQ/Antarctica isn't a valid region code for phone number formatting,
736
+ // so this falls back to intl formatting.
737
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::AQ(),
738
+ &formatted_number);
739
+ EXPECT_EQ("+1 650 253 0000", formatted_number);
740
+ // For region code 001, the out-of-country format always turns into the
741
+ // international format.
742
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::UN001(),
743
+ &formatted_number);
744
+ EXPECT_EQ("+1 650 253 0000", formatted_number);
745
+ }
746
+
747
+ TEST_F(PhoneNumberUtilTest, FormatOutOfCountryWithPreferredIntlPrefix) {
748
+ PhoneNumber test_number;
749
+ string formatted_number;
750
+ test_number.set_country_code(39);
751
+ test_number.set_national_number(236618300ULL);
752
+ test_number.set_italian_leading_zero(true);
753
+ // This should use 0011, since that is the preferred international prefix
754
+ // (both 0011 and 0012 are accepted as possible international prefixes in our
755
+ // test metadta.)
756
+ phone_util_.FormatOutOfCountryCallingNumber(test_number, RegionCode::AU(),
757
+ &formatted_number);
758
+ EXPECT_EQ("0011 39 02 3661 8300", formatted_number);
759
+ }
760
+
761
+ TEST_F(PhoneNumberUtilTest, FormatOutOfCountryKeepingAlphaChars) {
762
+ PhoneNumber alpha_numeric_number;
763
+ string formatted_number;
764
+ alpha_numeric_number.set_country_code(1);
765
+ alpha_numeric_number.set_national_number(8007493524ULL);
766
+ alpha_numeric_number.set_raw_input("1800 six-flag");
767
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
768
+ RegionCode::AU(),
769
+ &formatted_number);
770
+ EXPECT_EQ("0011 1 800 SIX-FLAG", formatted_number);
771
+
772
+ formatted_number.clear();
773
+ alpha_numeric_number.set_raw_input("1-800-SIX-flag");
774
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
775
+ RegionCode::AU(),
776
+ &formatted_number);
777
+ EXPECT_EQ("0011 1 800-SIX-FLAG", formatted_number);
778
+
779
+ formatted_number.clear();
780
+ alpha_numeric_number.set_raw_input("Call us from UK: 00 1 800 SIX-flag");
781
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
782
+ RegionCode::AU(),
783
+ &formatted_number);
784
+ EXPECT_EQ("0011 1 800 SIX-FLAG", formatted_number);
785
+
786
+ formatted_number.clear();
787
+ alpha_numeric_number.set_raw_input("800 SIX-flag");
788
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
789
+ RegionCode::AU(),
790
+ &formatted_number);
791
+ EXPECT_EQ("0011 1 800 SIX-FLAG", formatted_number);
792
+
793
+ // Formatting from within the NANPA region.
794
+ formatted_number.clear();
795
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
796
+ RegionCode::US(),
797
+ &formatted_number);
798
+ EXPECT_EQ("1 800 SIX-FLAG", formatted_number);
799
+ formatted_number.clear();
800
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
801
+ RegionCode::BS(),
802
+ &formatted_number);
803
+ EXPECT_EQ("1 800 SIX-FLAG", formatted_number);
804
+
805
+ // Testing that if the raw input doesn't exist, it is formatted using
806
+ // FormatOutOfCountryCallingNumber.
807
+ alpha_numeric_number.clear_raw_input();
808
+ formatted_number.clear();
809
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
810
+ RegionCode::DE(),
811
+ &formatted_number);
812
+ EXPECT_EQ("00 1 800 749 3524", formatted_number);
813
+
814
+ // Testing AU alpha number formatted from Australia.
815
+ alpha_numeric_number.set_country_code(61);
816
+ alpha_numeric_number.set_national_number(827493524ULL);
817
+ alpha_numeric_number.set_raw_input("+61 82749-FLAG");
818
+ formatted_number.clear();
819
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
820
+ RegionCode::AU(),
821
+ &formatted_number);
822
+ // This number should have the national prefix prefixed.
823
+ EXPECT_EQ("082749-FLAG", formatted_number);
824
+
825
+ alpha_numeric_number.set_raw_input("082749-FLAG");
826
+ formatted_number.clear();
827
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
828
+ RegionCode::AU(),
829
+ &formatted_number);
830
+ EXPECT_EQ("082749-FLAG", formatted_number);
831
+
832
+ alpha_numeric_number.set_national_number(18007493524ULL);
833
+ alpha_numeric_number.set_raw_input("1-800-SIX-flag");
834
+ formatted_number.clear();
835
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
836
+ RegionCode::AU(),
837
+ &formatted_number);
838
+ // This number should not have the national prefix prefixed, in accordance
839
+ // with the override for this specific formatting rule.
840
+ EXPECT_EQ("1-800-SIX-FLAG", formatted_number);
841
+ // The metadata should not be permanently changed, since we copied it before
842
+ // modifying patterns. Here we check this.
843
+ formatted_number.clear();
844
+ alpha_numeric_number.set_national_number(1800749352ULL);
845
+ phone_util_.FormatOutOfCountryCallingNumber(alpha_numeric_number,
846
+ RegionCode::AU(),
847
+ &formatted_number);
848
+ EXPECT_EQ("1800 749 352", formatted_number);
849
+
850
+ // Testing a country with multiple international prefixes.
851
+ formatted_number.clear();
852
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
853
+ RegionCode::SG(),
854
+ &formatted_number);
855
+ EXPECT_EQ("+61 1-800-SIX-FLAG", formatted_number);
856
+ // Testing the case of calling from a non-supported region.
857
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
858
+ RegionCode::AQ(),
859
+ &formatted_number);
860
+ EXPECT_EQ("+61 1-800-SIX-FLAG", formatted_number);
861
+
862
+ // Testing the case with an invalid country code.
863
+ formatted_number.clear();
864
+ alpha_numeric_number.set_country_code(0);
865
+ alpha_numeric_number.set_national_number(18007493524ULL);
866
+ alpha_numeric_number.set_raw_input("1-800-SIX-flag");
867
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
868
+ RegionCode::DE(),
869
+ &formatted_number);
870
+ // Uses the raw input only.
871
+ EXPECT_EQ("1-800-SIX-flag", formatted_number);
872
+
873
+ // Testing the case of an invalid alpha number.
874
+ formatted_number.clear();
875
+ alpha_numeric_number.set_country_code(1);
876
+ alpha_numeric_number.set_national_number(80749ULL);
877
+ alpha_numeric_number.set_raw_input("180-SIX");
878
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
879
+ RegionCode::DE(),
880
+ &formatted_number);
881
+ // No country-code stripping can be done.
882
+ EXPECT_EQ("00 1 180-SIX", formatted_number);
883
+ // Testing the case of calling from a non-supported region.
884
+ phone_util_.FormatOutOfCountryKeepingAlphaChars(alpha_numeric_number,
885
+ RegionCode::AQ(),
886
+ &formatted_number);
887
+ // No country-code stripping can be done since the number is invalid.
888
+ EXPECT_EQ("+1 180-SIX", formatted_number);
889
+ }
890
+
891
+ TEST_F(PhoneNumberUtilTest, FormatWithCarrierCode) {
892
+ // We only support this for AR in our test metadata.
893
+ PhoneNumber ar_number;
894
+ string formatted_number;
895
+ ar_number.set_country_code(54);
896
+ ar_number.set_national_number(91234125678ULL);
897
+ phone_util_.Format(ar_number, PhoneNumberUtil::NATIONAL, &formatted_number);
898
+ EXPECT_EQ("01234 12-5678", formatted_number);
899
+ // Test formatting with a carrier code.
900
+ phone_util_.FormatNationalNumberWithCarrierCode(ar_number, "15",
901
+ &formatted_number);
902
+ EXPECT_EQ("01234 15 12-5678", formatted_number);
903
+ phone_util_.FormatNationalNumberWithCarrierCode(ar_number, "",
904
+ &formatted_number);
905
+ EXPECT_EQ("01234 12-5678", formatted_number);
906
+ // Here the international rule is used, so no carrier code should be present.
907
+ phone_util_.Format(ar_number, PhoneNumberUtil::E164, &formatted_number);
908
+ EXPECT_EQ("+5491234125678", formatted_number);
909
+
910
+ // We don't support this for the US so there should be no change.
911
+ PhoneNumber us_number;
912
+ us_number.set_country_code(1);
913
+ us_number.set_national_number(4241231234ULL);
914
+ phone_util_.Format(us_number, PhoneNumberUtil::NATIONAL, &formatted_number);
915
+ EXPECT_EQ("424 123 1234", formatted_number);
916
+ phone_util_.FormatNationalNumberWithCarrierCode(us_number, "15",
917
+ &formatted_number);
918
+ EXPECT_EQ("424 123 1234", formatted_number);
919
+
920
+ // Invalid country code should just get the NSN.
921
+ PhoneNumber invalid_number;
922
+ invalid_number.set_country_code(kInvalidCountryCode);
923
+ invalid_number.set_national_number(12345ULL);
924
+ phone_util_.FormatNationalNumberWithCarrierCode(invalid_number, "89",
925
+ &formatted_number);
926
+ EXPECT_EQ("12345", formatted_number);
927
+ }
928
+
929
+ TEST_F(PhoneNumberUtilTest, FormatWithPreferredCarrierCode) {
930
+ // We only support this for AR in our test metadata.
931
+ PhoneNumber ar_number;
932
+ string formatted_number;
933
+ ar_number.set_country_code(54);
934
+ ar_number.set_national_number(91234125678ULL);
935
+ // Test formatting with no preferred carrier code stored in the number itself.
936
+ phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "15",
937
+ &formatted_number);
938
+ EXPECT_EQ("01234 15 12-5678", formatted_number);
939
+ phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "",
940
+ &formatted_number);
941
+ EXPECT_EQ("01234 12-5678", formatted_number);
942
+ // Test formatting with preferred carrier code present.
943
+ ar_number.set_preferred_domestic_carrier_code("19");
944
+ phone_util_.Format(ar_number, PhoneNumberUtil::NATIONAL, &formatted_number);
945
+ EXPECT_EQ("01234 12-5678", formatted_number);
946
+ phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "15",
947
+ &formatted_number);
948
+ EXPECT_EQ("01234 19 12-5678", formatted_number);
949
+ phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "",
950
+ &formatted_number);
951
+ EXPECT_EQ("01234 19 12-5678", formatted_number);
952
+ // When the preferred_domestic_carrier_code is present (even when it contains
953
+ // an empty string), use it instead of the default carrier code passed in.
954
+ ar_number.set_preferred_domestic_carrier_code("");
955
+ phone_util_.FormatNationalNumberWithPreferredCarrierCode(ar_number, "15",
956
+ &formatted_number);
957
+ EXPECT_EQ("01234 12-5678", formatted_number);
958
+ // We don't support this for the US so there should be no change.
959
+ PhoneNumber us_number;
960
+ us_number.set_country_code(1);
961
+ us_number.set_national_number(4241231234ULL);
962
+ us_number.set_preferred_domestic_carrier_code("99");
963
+ phone_util_.Format(us_number, PhoneNumberUtil::NATIONAL, &formatted_number);
964
+ EXPECT_EQ("424 123 1234", formatted_number);
965
+ phone_util_.FormatNationalNumberWithPreferredCarrierCode(us_number, "15",
966
+ &formatted_number);
967
+ EXPECT_EQ("424 123 1234", formatted_number);
968
+ }
969
+
970
+ TEST_F(PhoneNumberUtilTest, FormatNumberForMobileDialing) {
971
+ PhoneNumber test_number;
972
+ string formatted_number;
973
+
974
+ // Numbers are normally dialed in national format in-country, and
975
+ // international format from outside the country.
976
+ test_number.set_country_code(49);
977
+ test_number.set_national_number(30123456ULL);
978
+ phone_util_.FormatNumberForMobileDialing(
979
+ test_number, RegionCode::DE(), false, /* remove formatting */
980
+ &formatted_number);
981
+ EXPECT_EQ("030123456", formatted_number);
982
+ phone_util_.FormatNumberForMobileDialing(
983
+ test_number, RegionCode::CH(), false, /* remove formatting */
984
+ &formatted_number);
985
+ EXPECT_EQ("+4930123456", formatted_number);
986
+
987
+ test_number.set_extension("1234");
988
+ phone_util_.FormatNumberForMobileDialing(
989
+ test_number, RegionCode::DE(), false, /* remove formatting */
990
+ &formatted_number);
991
+ EXPECT_EQ("030123456", formatted_number);
992
+ phone_util_.FormatNumberForMobileDialing(
993
+ test_number, RegionCode::CH(), false, /* remove formatting */
994
+ &formatted_number);
995
+ EXPECT_EQ("+4930123456", formatted_number);
996
+
997
+ test_number.set_country_code(1);
998
+ test_number.clear_extension();
999
+ // US toll free numbers are marked as noInternationalDialling in the test
1000
+ // metadata for testing purposes. For such numbers, we expect nothing to be
1001
+ // returned when the region code is not the same one.
1002
+ test_number.set_national_number(8002530000ULL);
1003
+ phone_util_.FormatNumberForMobileDialing(
1004
+ test_number, RegionCode::US(), true, /* keep formatting */
1005
+ &formatted_number);
1006
+ EXPECT_EQ("800 253 0000", formatted_number);
1007
+ phone_util_.FormatNumberForMobileDialing(
1008
+ test_number, RegionCode::CN(), true, &formatted_number);
1009
+ EXPECT_EQ("", formatted_number);
1010
+ phone_util_.FormatNumberForMobileDialing(
1011
+ test_number, RegionCode::US(), false, /* remove formatting */
1012
+ &formatted_number);
1013
+ EXPECT_EQ("8002530000", formatted_number);
1014
+ phone_util_.FormatNumberForMobileDialing(
1015
+ test_number, RegionCode::CN(), false, &formatted_number);
1016
+ EXPECT_EQ("", formatted_number);
1017
+
1018
+ test_number.set_national_number(6502530000ULL);
1019
+ phone_util_.FormatNumberForMobileDialing(
1020
+ test_number, RegionCode::US(), true, &formatted_number);
1021
+ EXPECT_EQ("+1 650 253 0000", formatted_number);
1022
+ phone_util_.FormatNumberForMobileDialing(
1023
+ test_number, RegionCode::US(), false, &formatted_number);
1024
+ EXPECT_EQ("+16502530000", formatted_number);
1025
+
1026
+ test_number.set_extension("1234");
1027
+ phone_util_.FormatNumberForMobileDialing(
1028
+ test_number, RegionCode::US(), true, &formatted_number);
1029
+ EXPECT_EQ("+1 650 253 0000", formatted_number);
1030
+ phone_util_.FormatNumberForMobileDialing(
1031
+ test_number, RegionCode::US(), false, &formatted_number);
1032
+ EXPECT_EQ("+16502530000", formatted_number);
1033
+
1034
+ // An invalid US number, which is one digit too long.
1035
+ test_number.set_national_number(65025300001ULL);
1036
+ phone_util_.FormatNumberForMobileDialing(
1037
+ test_number, RegionCode::US(), true, &formatted_number);
1038
+ EXPECT_EQ("+1 65025300001", formatted_number);
1039
+ phone_util_.FormatNumberForMobileDialing(
1040
+ test_number, RegionCode::US(), false, &formatted_number);
1041
+ EXPECT_EQ("+165025300001", formatted_number);
1042
+
1043
+ // Star numbers. In real life they appear in Israel, but we have them in JP
1044
+ // in our test metadata.
1045
+ test_number.set_country_code(81);
1046
+ test_number.set_national_number(2345ULL);
1047
+ phone_util_.FormatNumberForMobileDialing(
1048
+ test_number, RegionCode::JP(), true, &formatted_number);
1049
+ EXPECT_EQ("*2345", formatted_number);
1050
+ phone_util_.FormatNumberForMobileDialing(
1051
+ test_number, RegionCode::JP(), false, &formatted_number);
1052
+ EXPECT_EQ("*2345", formatted_number);
1053
+
1054
+ test_number.set_country_code(800);
1055
+ test_number.set_national_number(12345678ULL);
1056
+ phone_util_.FormatNumberForMobileDialing(
1057
+ test_number, RegionCode::JP(), false, &formatted_number);
1058
+ EXPECT_EQ("+80012345678", formatted_number);
1059
+ phone_util_.FormatNumberForMobileDialing(
1060
+ test_number, RegionCode::JP(), true, &formatted_number);
1061
+ EXPECT_EQ("+800 1234 5678", formatted_number);
1062
+
1063
+ // UAE numbers beginning with 600 (classified as UAN) need to be dialled
1064
+ // without +971 locally.
1065
+ test_number.set_country_code(971);
1066
+ test_number.set_national_number(600123456ULL);
1067
+ phone_util_.FormatNumberForMobileDialing(
1068
+ test_number, RegionCode::JP(), false, &formatted_number);
1069
+ EXPECT_EQ("+971600123456", formatted_number);
1070
+ phone_util_.FormatNumberForMobileDialing(
1071
+ test_number, RegionCode::AE(), true, &formatted_number);
1072
+ EXPECT_EQ("600123456", formatted_number);
1073
+
1074
+ test_number.set_country_code(52);
1075
+ test_number.set_national_number(3312345678ULL);
1076
+ phone_util_.FormatNumberForMobileDialing(
1077
+ test_number, RegionCode::MX(), false, &formatted_number);
1078
+ EXPECT_EQ("+523312345678", formatted_number);
1079
+ phone_util_.FormatNumberForMobileDialing(
1080
+ test_number, RegionCode::US(), false, &formatted_number);
1081
+ EXPECT_EQ("+523312345678", formatted_number);
1082
+
1083
+ // Non-geographical numbers should always be dialed in international format.
1084
+ test_number.set_country_code(800);
1085
+ test_number.set_national_number(12345678ULL);
1086
+ phone_util_.FormatNumberForMobileDialing(
1087
+ test_number, RegionCode::US(), false, &formatted_number);
1088
+ EXPECT_EQ("+80012345678", formatted_number);
1089
+ phone_util_.FormatNumberForMobileDialing(
1090
+ test_number, RegionCode::UN001(), false, &formatted_number);
1091
+ EXPECT_EQ("+80012345678", formatted_number);
1092
+
1093
+ // Test that a short number is formatted correctly for mobile dialing within
1094
+ // the region, and is not diallable from outside the region.
1095
+ test_number.set_country_code(49);
1096
+ test_number.set_national_number(123L);
1097
+ phone_util_.FormatNumberForMobileDialing(
1098
+ test_number, RegionCode::DE(), false, &formatted_number);
1099
+ EXPECT_EQ("123", formatted_number);
1100
+ phone_util_.FormatNumberForMobileDialing(
1101
+ test_number, RegionCode::IT(), false, &formatted_number);
1102
+ EXPECT_EQ("", formatted_number);
1103
+
1104
+ // Test the special logic for Hungary, where the national prefix must be
1105
+ // added before dialing from a mobile phone for regular length numbers, but
1106
+ // not for short numbers.
1107
+ test_number.set_country_code(36);
1108
+ test_number.set_national_number(301234567L);
1109
+ phone_util_.FormatNumberForMobileDialing(
1110
+ test_number, RegionCode::HU(), false, &formatted_number);
1111
+ EXPECT_EQ("06301234567", formatted_number);
1112
+ phone_util_.FormatNumberForMobileDialing(
1113
+ test_number, RegionCode::JP(), false, &formatted_number);
1114
+ EXPECT_EQ("+36301234567", formatted_number);
1115
+ test_number.set_national_number(104L);
1116
+ phone_util_.FormatNumberForMobileDialing(
1117
+ test_number, RegionCode::HU(), false, &formatted_number);
1118
+ EXPECT_EQ("104", formatted_number);
1119
+ phone_util_.FormatNumberForMobileDialing(
1120
+ test_number, RegionCode::JP(), false, &formatted_number);
1121
+ EXPECT_EQ("", formatted_number);
1122
+
1123
+ // Test the special logic for NANPA countries, for which regular length phone
1124
+ // numbers are always output in international format, but short numbers are
1125
+ // in national format.
1126
+ test_number.set_country_code(1);
1127
+ test_number.set_national_number(6502530000L);
1128
+ phone_util_.FormatNumberForMobileDialing(
1129
+ test_number, RegionCode::US(), false, &formatted_number);
1130
+ EXPECT_EQ("+16502530000", formatted_number);
1131
+ phone_util_.FormatNumberForMobileDialing(
1132
+ test_number, RegionCode::CA(), false, &formatted_number);
1133
+ EXPECT_EQ("+16502530000", formatted_number);
1134
+ phone_util_.FormatNumberForMobileDialing(
1135
+ test_number, RegionCode::BR(), false, &formatted_number);
1136
+ EXPECT_EQ("+16502530000", formatted_number);
1137
+ test_number.set_national_number(911L);
1138
+ phone_util_.FormatNumberForMobileDialing(
1139
+ test_number, RegionCode::US(), false, &formatted_number);
1140
+ EXPECT_EQ("911", formatted_number);
1141
+ phone_util_.FormatNumberForMobileDialing(
1142
+ test_number, RegionCode::CA(), false, &formatted_number);
1143
+ EXPECT_EQ("", formatted_number);
1144
+ phone_util_.FormatNumberForMobileDialing(
1145
+ test_number, RegionCode::BR(), false, &formatted_number);
1146
+ EXPECT_EQ("", formatted_number);
1147
+ // Test that the Australian emergency number 000 is formatted correctly.
1148
+ test_number.set_country_code(61);
1149
+ test_number.set_national_number(0L);
1150
+ test_number.set_italian_leading_zero(true);
1151
+ test_number.set_number_of_leading_zeros(2);
1152
+ phone_util_.FormatNumberForMobileDialing(
1153
+ test_number, RegionCode::AU(), false, &formatted_number);
1154
+ EXPECT_EQ("000", formatted_number);
1155
+ phone_util_.FormatNumberForMobileDialing(
1156
+ test_number, RegionCode::NZ(), false, &formatted_number);
1157
+ EXPECT_EQ("", formatted_number);
1158
+ }
1159
+
1160
+ TEST_F(PhoneNumberUtilTest, FormatByPattern) {
1161
+ PhoneNumber test_number;
1162
+ string formatted_number;
1163
+ test_number.set_country_code(1);
1164
+ test_number.set_national_number(6502530000ULL);
1165
+
1166
+ RepeatedPtrField<NumberFormat> number_formats;
1167
+ NumberFormat* number_format = number_formats.Add();
1168
+ number_format->set_pattern("(\\d{3})(\\d{3})(\\d{4})");
1169
+ number_format->set_format("($1) $2-$3");
1170
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
1171
+ number_formats,
1172
+ &formatted_number);
1173
+ EXPECT_EQ("(650) 253-0000", formatted_number);
1174
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::INTERNATIONAL,
1175
+ number_formats,
1176
+ &formatted_number);
1177
+ EXPECT_EQ("+1 (650) 253-0000", formatted_number);
1178
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::RFC3966,
1179
+ number_formats,
1180
+ &formatted_number);
1181
+ EXPECT_EQ("tel:+1-650-253-0000", formatted_number);
1182
+
1183
+ // $NP is set to '1' for the US. Here we check that for other NANPA countries
1184
+ // the US rules are followed.
1185
+ number_format->set_national_prefix_formatting_rule("$NP ($FG)");
1186
+ number_format->set_format("$1 $2-$3");
1187
+ test_number.set_country_code(1);
1188
+ test_number.set_national_number(4168819999ULL);
1189
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
1190
+ number_formats,
1191
+ &formatted_number);
1192
+ EXPECT_EQ("1 (416) 881-9999", formatted_number);
1193
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::INTERNATIONAL,
1194
+ number_formats,
1195
+ &formatted_number);
1196
+ EXPECT_EQ("+1 416 881-9999", formatted_number);
1197
+
1198
+ test_number.set_country_code(39);
1199
+ test_number.set_national_number(236618300ULL);
1200
+ test_number.set_italian_leading_zero(true);
1201
+ number_format->set_pattern("(\\d{2})(\\d{5})(\\d{3})");
1202
+ number_format->set_format("$1-$2 $3");
1203
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
1204
+ number_formats,
1205
+ &formatted_number);
1206
+ EXPECT_EQ("02-36618 300", formatted_number);
1207
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::INTERNATIONAL,
1208
+ number_formats,
1209
+ &formatted_number);
1210
+ EXPECT_EQ("+39 02-36618 300", formatted_number);
1211
+
1212
+ test_number.set_country_code(44);
1213
+ test_number.set_national_number(2012345678ULL);
1214
+ test_number.set_italian_leading_zero(false);
1215
+ number_format->set_national_prefix_formatting_rule("$NP$FG");
1216
+ number_format->set_pattern("(\\d{2})(\\d{4})(\\d{4})");
1217
+ number_format->set_format("$1 $2 $3");
1218
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
1219
+ number_formats,
1220
+ &formatted_number);
1221
+ EXPECT_EQ("020 1234 5678", formatted_number);
1222
+
1223
+ number_format->set_national_prefix_formatting_rule("($NP$FG)");
1224
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
1225
+ number_formats,
1226
+ &formatted_number);
1227
+ EXPECT_EQ("(020) 1234 5678", formatted_number);
1228
+ number_format->set_national_prefix_formatting_rule("");
1229
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::NATIONAL,
1230
+ number_formats,
1231
+ &formatted_number);
1232
+ EXPECT_EQ("20 1234 5678", formatted_number);
1233
+ number_format->set_national_prefix_formatting_rule("");
1234
+ phone_util_.FormatByPattern(test_number, PhoneNumberUtil::INTERNATIONAL,
1235
+ number_formats,
1236
+ &formatted_number);
1237
+ EXPECT_EQ("+44 20 1234 5678", formatted_number);
1238
+ }
1239
+
1240
+ TEST_F(PhoneNumberUtilTest, FormatE164Number) {
1241
+ PhoneNumber test_number;
1242
+ string formatted_number;
1243
+ test_number.set_country_code(1);
1244
+ test_number.set_national_number(6502530000ULL);
1245
+ phone_util_.Format(test_number, PhoneNumberUtil::E164, &formatted_number);
1246
+ EXPECT_EQ("+16502530000", formatted_number);
1247
+
1248
+ test_number.set_country_code(49);
1249
+ test_number.set_national_number(301234ULL);
1250
+ phone_util_.Format(test_number, PhoneNumberUtil::E164, &formatted_number);
1251
+ EXPECT_EQ("+49301234", formatted_number);
1252
+
1253
+ test_number.set_country_code(800);
1254
+ test_number.set_national_number(12345678ULL);
1255
+ phone_util_.Format(test_number, PhoneNumberUtil::E164, &formatted_number);
1256
+ EXPECT_EQ("+80012345678", formatted_number);
1257
+ }
1258
+
1259
+ TEST_F(PhoneNumberUtilTest, FormatNumberWithExtension) {
1260
+ PhoneNumber nz_number;
1261
+ nz_number.set_country_code(64);
1262
+ nz_number.set_national_number(33316005ULL);
1263
+ nz_number.set_extension("1234");
1264
+ string formatted_number;
1265
+ // Uses default extension prefix:
1266
+ phone_util_.Format(nz_number, PhoneNumberUtil::NATIONAL, &formatted_number);
1267
+ EXPECT_EQ("03-331 6005 ext. 1234", formatted_number);
1268
+ // Uses RFC 3966 syntax.
1269
+ phone_util_.Format(nz_number, PhoneNumberUtil::RFC3966, &formatted_number);
1270
+ EXPECT_EQ("tel:+64-3-331-6005;ext=1234", formatted_number);
1271
+ // Extension prefix overridden in the territory information for the US:
1272
+ PhoneNumber us_number_with_extension;
1273
+ us_number_with_extension.set_country_code(1);
1274
+ us_number_with_extension.set_national_number(6502530000ULL);
1275
+ us_number_with_extension.set_extension("4567");
1276
+ phone_util_.Format(us_number_with_extension,
1277
+ PhoneNumberUtil::NATIONAL, &formatted_number);
1278
+ EXPECT_EQ("650 253 0000 extn. 4567", formatted_number);
1279
+ }
1280
+
1281
+ TEST_F(PhoneNumberUtilTest, GetLengthOfGeographicalAreaCode) {
1282
+ PhoneNumber number;
1283
+ // Google MTV, which has area code "650".
1284
+ number.set_country_code(1);
1285
+ number.set_national_number(6502530000ULL);
1286
+ EXPECT_EQ(3, phone_util_.GetLengthOfGeographicalAreaCode(number));
1287
+
1288
+ // A North America toll-free number, which has no area code.
1289
+ number.set_country_code(1);
1290
+ number.set_national_number(8002530000ULL);
1291
+ EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
1292
+
1293
+ // An invalid US number (1 digit shorter), which has no area code.
1294
+ number.set_country_code(1);
1295
+ number.set_national_number(650253000ULL);
1296
+ EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
1297
+
1298
+ // Google London, which has area code "20".
1299
+ number.set_country_code(44);
1300
+ number.set_national_number(2070313000ULL);
1301
+ EXPECT_EQ(2, phone_util_.GetLengthOfGeographicalAreaCode(number));
1302
+
1303
+ // A UK mobile phone, which has no area code.
1304
+ number.set_country_code(44);
1305
+ number.set_national_number(7123456789ULL);
1306
+ EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
1307
+
1308
+ // Google Buenos Aires, which has area code "11".
1309
+ number.set_country_code(54);
1310
+ number.set_national_number(1155303000ULL);
1311
+ EXPECT_EQ(2, phone_util_.GetLengthOfGeographicalAreaCode(number));
1312
+
1313
+ // Google Sydney, which has area code "2".
1314
+ number.set_country_code(61);
1315
+ number.set_national_number(293744000ULL);
1316
+ EXPECT_EQ(1, phone_util_.GetLengthOfGeographicalAreaCode(number));
1317
+
1318
+ // Italian numbers - there is no national prefix, but it still has an area
1319
+ // code.
1320
+ number.set_country_code(39);
1321
+ number.set_national_number(236618300ULL);
1322
+ number.set_italian_leading_zero(true);
1323
+ EXPECT_EQ(2, phone_util_.GetLengthOfGeographicalAreaCode(number));
1324
+
1325
+ // Google Singapore. Singapore has no area code and no national prefix.
1326
+ number.set_country_code(65);
1327
+ number.set_national_number(65218000ULL);
1328
+ number.set_italian_leading_zero(false);
1329
+ EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
1330
+
1331
+ // An international toll free number, which has no area code.
1332
+ number.set_country_code(800);
1333
+ number.set_national_number(12345678ULL);
1334
+ EXPECT_EQ(0, phone_util_.GetLengthOfGeographicalAreaCode(number));
1335
+ }
1336
+
1337
+ TEST_F(PhoneNumberUtilTest, GetLengthOfNationalDestinationCode) {
1338
+ PhoneNumber number;
1339
+ // Google MTV, which has national destination code (NDC) "650".
1340
+ number.set_country_code(1);
1341
+ number.set_national_number(6502530000ULL);
1342
+ EXPECT_EQ(3, phone_util_.GetLengthOfNationalDestinationCode(number));
1343
+
1344
+ // A North America toll-free number, which has NDC "800".
1345
+ number.set_country_code(1);
1346
+ number.set_national_number(8002530000ULL);
1347
+ EXPECT_EQ(3, phone_util_.GetLengthOfNationalDestinationCode(number));
1348
+
1349
+ // Google London, which has NDC "20".
1350
+ number.set_country_code(44);
1351
+ number.set_national_number(2070313000ULL);
1352
+ EXPECT_EQ(2, phone_util_.GetLengthOfNationalDestinationCode(number));
1353
+
1354
+ // A UK mobile phone, which has NDC "7123"
1355
+ number.set_country_code(44);
1356
+ number.set_national_number(7123456789ULL);
1357
+ EXPECT_EQ(4, phone_util_.GetLengthOfNationalDestinationCode(number));
1358
+
1359
+ // Google Buenos Aires, which has NDC "11".
1360
+ number.set_country_code(54);
1361
+ number.set_national_number(1155303000ULL);
1362
+ EXPECT_EQ(2, phone_util_.GetLengthOfNationalDestinationCode(number));
1363
+
1364
+ // An Argentinian mobile which has NDC "911".
1365
+ number.set_country_code(54);
1366
+ number.set_national_number(91187654321ULL);
1367
+ EXPECT_EQ(3, phone_util_.GetLengthOfNationalDestinationCode(number));
1368
+
1369
+ // Google Sydney, which has NDC "2".
1370
+ number.set_country_code(61);
1371
+ number.set_national_number(293744000ULL);
1372
+ EXPECT_EQ(1, phone_util_.GetLengthOfNationalDestinationCode(number));
1373
+
1374
+ // Google Singapore. Singapore has NDC "6521".
1375
+ number.set_country_code(65);
1376
+ number.set_national_number(65218000ULL);
1377
+ EXPECT_EQ(4, phone_util_.GetLengthOfNationalDestinationCode(number));
1378
+
1379
+ // An invalid US number (1 digit shorter), which has no NDC.
1380
+ number.set_country_code(1);
1381
+ number.set_national_number(650253000ULL);
1382
+ EXPECT_EQ(0, phone_util_.GetLengthOfNationalDestinationCode(number));
1383
+
1384
+ // A number containing an invalid country code, which shouldn't have any NDC.
1385
+ number.set_country_code(123);
1386
+ number.set_national_number(650253000ULL);
1387
+ EXPECT_EQ(0, phone_util_.GetLengthOfNationalDestinationCode(number));
1388
+
1389
+ // A number that has only one group of digits after country code when
1390
+ // formatted in the international format.
1391
+ number.set_country_code(376);
1392
+ number.set_national_number(12345ULL);
1393
+ EXPECT_EQ(0, phone_util_.GetLengthOfNationalDestinationCode(number));
1394
+
1395
+ // The same number above, but with an extension.
1396
+ number.set_country_code(376);
1397
+ number.set_national_number(12345ULL);
1398
+ number.set_extension("321");
1399
+ EXPECT_EQ(0, phone_util_.GetLengthOfNationalDestinationCode(number));
1400
+
1401
+ // An international toll free number, which has NDC "1234".
1402
+ number.Clear();
1403
+ number.set_country_code(800);
1404
+ number.set_national_number(12345678ULL);
1405
+ EXPECT_EQ(4, phone_util_.GetLengthOfNationalDestinationCode(number));
1406
+ }
1407
+
1408
+ TEST_F(PhoneNumberUtilTest, GetCountryMobileToken) {
1409
+ int country_calling_code;
1410
+ string mobile_token;
1411
+
1412
+ country_calling_code = phone_util_.GetCountryCodeForRegion(RegionCode::MX());
1413
+ phone_util_.GetCountryMobileToken(country_calling_code, &mobile_token);
1414
+ EXPECT_EQ("1", mobile_token);
1415
+
1416
+ // Country calling code for Sweden, which has no mobile token.
1417
+ country_calling_code = phone_util_.GetCountryCodeForRegion(RegionCode::SE());
1418
+ phone_util_.GetCountryMobileToken(country_calling_code, &mobile_token);
1419
+ EXPECT_EQ("", mobile_token);
1420
+ }
1421
+
1422
+ TEST_F(PhoneNumberUtilTest, ExtractPossibleNumber) {
1423
+ // Removes preceding funky punctuation and letters but leaves the rest
1424
+ // untouched.
1425
+ string extracted_number;
1426
+ ExtractPossibleNumber("Tel:0800-345-600", &extracted_number);
1427
+ EXPECT_EQ("0800-345-600", extracted_number);
1428
+ ExtractPossibleNumber("Tel:0800 FOR PIZZA", &extracted_number);
1429
+ EXPECT_EQ("0800 FOR PIZZA", extracted_number);
1430
+
1431
+ // Should not remove plus sign.
1432
+ ExtractPossibleNumber("Tel:+800-345-600", &extracted_number);
1433
+ EXPECT_EQ("+800-345-600", extracted_number);
1434
+ // Should recognise wide digits as possible start values.
1435
+ ExtractPossibleNumber("\xEF\xBC\x90\xEF\xBC\x92\xEF\xBC\x93" /* "023" */,
1436
+ &extracted_number);
1437
+ EXPECT_EQ("\xEF\xBC\x90\xEF\xBC\x92\xEF\xBC\x93" /* "023" */,
1438
+ extracted_number);
1439
+ // Dashes are not possible start values and should be removed.
1440
+ ExtractPossibleNumber("Num-\xEF\xBC\x91\xEF\xBC\x92\xEF\xBC\x93"
1441
+ /* "Num-123" */, &extracted_number);
1442
+ EXPECT_EQ("\xEF\xBC\x91\xEF\xBC\x92\xEF\xBC\x93" /* "123" */,
1443
+ extracted_number);
1444
+ // If not possible number present, return empty string.
1445
+ ExtractPossibleNumber("Num-....", &extracted_number);
1446
+ EXPECT_EQ("", extracted_number);
1447
+ // Leading brackets are stripped - these are not used when parsing.
1448
+ ExtractPossibleNumber("(650) 253-0000", &extracted_number);
1449
+ EXPECT_EQ("650) 253-0000", extracted_number);
1450
+
1451
+ // Trailing non-alpha-numeric characters should be removed.
1452
+ ExtractPossibleNumber("(650) 253-0000..- ..", &extracted_number);
1453
+ EXPECT_EQ("650) 253-0000", extracted_number);
1454
+ ExtractPossibleNumber("(650) 253-0000.", &extracted_number);
1455
+ EXPECT_EQ("650) 253-0000", extracted_number);
1456
+ // This case has a trailing RTL char.
1457
+ ExtractPossibleNumber("(650) 253-0000\xE2\x80\x8F"
1458
+ /* "(650) 253-0000‏" */, &extracted_number);
1459
+ EXPECT_EQ("650) 253-0000", extracted_number);
1460
+ }
1461
+
1462
+ TEST_F(PhoneNumberUtilTest, IsNANPACountry) {
1463
+ EXPECT_TRUE(phone_util_.IsNANPACountry(RegionCode::US()));
1464
+ EXPECT_TRUE(phone_util_.IsNANPACountry(RegionCode::BS()));
1465
+ EXPECT_FALSE(phone_util_.IsNANPACountry(RegionCode::DE()));
1466
+ EXPECT_FALSE(phone_util_.IsNANPACountry(RegionCode::GetUnknown()));
1467
+ EXPECT_FALSE(phone_util_.IsNANPACountry(RegionCode::UN001()));
1468
+ }
1469
+
1470
+ TEST_F(PhoneNumberUtilTest, IsValidNumber) {
1471
+ PhoneNumber us_number;
1472
+ us_number.set_country_code(1);
1473
+ us_number.set_national_number(6502530000ULL);
1474
+ EXPECT_TRUE(phone_util_.IsValidNumber(us_number));
1475
+
1476
+ PhoneNumber it_number;
1477
+ it_number.set_country_code(39);
1478
+ it_number.set_national_number(236618300ULL);
1479
+ it_number.set_italian_leading_zero(true);
1480
+ EXPECT_TRUE(phone_util_.IsValidNumber(it_number));
1481
+
1482
+ PhoneNumber gb_number;
1483
+ gb_number.set_country_code(44);
1484
+ gb_number.set_national_number(7912345678ULL);
1485
+ EXPECT_TRUE(phone_util_.IsValidNumber(gb_number));
1486
+
1487
+ PhoneNumber nz_number;
1488
+ nz_number.set_country_code(64);
1489
+ nz_number.set_national_number(21387835ULL);
1490
+ EXPECT_TRUE(phone_util_.IsValidNumber(nz_number));
1491
+
1492
+ PhoneNumber intl_toll_free_number;
1493
+ intl_toll_free_number.set_country_code(800);
1494
+ intl_toll_free_number.set_national_number(12345678ULL);
1495
+ EXPECT_TRUE(phone_util_.IsValidNumber(intl_toll_free_number));
1496
+
1497
+ PhoneNumber universal_premium_rate;
1498
+ universal_premium_rate.set_country_code(979);
1499
+ universal_premium_rate.set_national_number(123456789ULL);
1500
+ EXPECT_TRUE(phone_util_.IsValidNumber(universal_premium_rate));
1501
+ }
1502
+
1503
+ TEST_F(PhoneNumberUtilTest, IsValidForRegion) {
1504
+ // This number is valid for the Bahamas, but is not a valid US number.
1505
+ PhoneNumber bs_number;
1506
+ bs_number.set_country_code(1);
1507
+ bs_number.set_national_number(2423232345ULL);
1508
+ EXPECT_TRUE(phone_util_.IsValidNumber(bs_number));
1509
+ EXPECT_TRUE(phone_util_.IsValidNumberForRegion(bs_number, RegionCode::BS()));
1510
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(bs_number, RegionCode::US()));
1511
+ bs_number.set_national_number(2421232345ULL);
1512
+ // This number is no longer valid.
1513
+ EXPECT_FALSE(phone_util_.IsValidNumber(bs_number));
1514
+
1515
+ // La Mayotte and Réunion use 'leadingDigits' to differentiate them.
1516
+ PhoneNumber re_number;
1517
+ re_number.set_country_code(262);
1518
+ re_number.set_national_number(262123456ULL);
1519
+ EXPECT_TRUE(phone_util_.IsValidNumber(re_number));
1520
+ EXPECT_TRUE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::RE()));
1521
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::YT()));
1522
+ // Now change the number to be a number for La Mayotte.
1523
+ re_number.set_national_number(269601234ULL);
1524
+ EXPECT_TRUE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::YT()));
1525
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::RE()));
1526
+ // This number is no longer valid.
1527
+ re_number.set_national_number(269123456ULL);
1528
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::YT()));
1529
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::RE()));
1530
+ EXPECT_FALSE(phone_util_.IsValidNumber(re_number));
1531
+ // However, it should be recognised as from La Mayotte.
1532
+ string region_code;
1533
+ phone_util_.GetRegionCodeForNumber(re_number, &region_code);
1534
+ EXPECT_EQ(RegionCode::YT(), region_code);
1535
+ // This number is valid in both places.
1536
+ re_number.set_national_number(800123456ULL);
1537
+ EXPECT_TRUE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::YT()));
1538
+ EXPECT_TRUE(phone_util_.IsValidNumberForRegion(re_number, RegionCode::RE()));
1539
+
1540
+ PhoneNumber intl_toll_free_number;
1541
+ intl_toll_free_number.set_country_code(800);
1542
+ intl_toll_free_number.set_national_number(12345678ULL);
1543
+ EXPECT_TRUE(phone_util_.IsValidNumberForRegion(intl_toll_free_number,
1544
+ RegionCode::UN001()));
1545
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(intl_toll_free_number,
1546
+ RegionCode::US()));
1547
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(intl_toll_free_number,
1548
+ RegionCode::ZZ()));
1549
+
1550
+ PhoneNumber invalid_number;
1551
+ // Invalid country calling codes.
1552
+ invalid_number.set_country_code(3923);
1553
+ invalid_number.set_national_number(2366ULL);
1554
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(invalid_number,
1555
+ RegionCode::ZZ()));
1556
+ invalid_number.set_country_code(3923);
1557
+ invalid_number.set_national_number(2366ULL);
1558
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(invalid_number,
1559
+ RegionCode::UN001()));
1560
+ invalid_number.set_country_code(0);
1561
+ invalid_number.set_national_number(2366ULL);
1562
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(invalid_number,
1563
+ RegionCode::UN001()));
1564
+ invalid_number.set_country_code(0);
1565
+ EXPECT_FALSE(phone_util_.IsValidNumberForRegion(invalid_number,
1566
+ RegionCode::ZZ()));
1567
+ }
1568
+
1569
+ TEST_F(PhoneNumberUtilTest, IsNotValidNumber) {
1570
+ PhoneNumber us_number;
1571
+ us_number.set_country_code(1);
1572
+ us_number.set_national_number(2530000ULL);
1573
+ EXPECT_FALSE(phone_util_.IsValidNumber(us_number));
1574
+
1575
+ PhoneNumber it_number;
1576
+ it_number.set_country_code(39);
1577
+ it_number.set_national_number(23661830000ULL);
1578
+ it_number.set_italian_leading_zero(true);
1579
+ EXPECT_FALSE(phone_util_.IsValidNumber(it_number));
1580
+
1581
+ PhoneNumber gb_number;
1582
+ gb_number.set_country_code(44);
1583
+ gb_number.set_national_number(791234567ULL);
1584
+ EXPECT_FALSE(phone_util_.IsValidNumber(gb_number));
1585
+
1586
+ PhoneNumber de_number;
1587
+ de_number.set_country_code(49);
1588
+ de_number.set_national_number(1234ULL);
1589
+ EXPECT_FALSE(phone_util_.IsValidNumber(de_number));
1590
+
1591
+ PhoneNumber nz_number;
1592
+ nz_number.set_country_code(64);
1593
+ nz_number.set_national_number(3316005ULL);
1594
+ EXPECT_FALSE(phone_util_.IsValidNumber(nz_number));
1595
+
1596
+ PhoneNumber invalid_number;
1597
+ // Invalid country calling codes.
1598
+ invalid_number.set_country_code(3923);
1599
+ invalid_number.set_national_number(2366ULL);
1600
+ EXPECT_FALSE(phone_util_.IsValidNumber(invalid_number));
1601
+ invalid_number.set_country_code(0);
1602
+ EXPECT_FALSE(phone_util_.IsValidNumber(invalid_number));
1603
+
1604
+ PhoneNumber intl_toll_free_number_too_long;
1605
+ intl_toll_free_number_too_long.set_country_code(800);
1606
+ intl_toll_free_number_too_long.set_national_number(123456789ULL);
1607
+ EXPECT_FALSE(phone_util_.IsValidNumber(intl_toll_free_number_too_long));
1608
+ }
1609
+
1610
+ TEST_F(PhoneNumberUtilTest, GetRegionCodeForCountryCode) {
1611
+ string region_code;
1612
+ phone_util_.GetRegionCodeForCountryCode(1, &region_code);
1613
+ EXPECT_EQ(RegionCode::US(), region_code);
1614
+ phone_util_.GetRegionCodeForCountryCode(44, &region_code);
1615
+ EXPECT_EQ(RegionCode::GB(), region_code);
1616
+ phone_util_.GetRegionCodeForCountryCode(49, &region_code);
1617
+ EXPECT_EQ(RegionCode::DE(), region_code);
1618
+ phone_util_.GetRegionCodeForCountryCode(800, &region_code);
1619
+ EXPECT_EQ(RegionCode::UN001(), region_code);
1620
+ phone_util_.GetRegionCodeForCountryCode(979, &region_code);
1621
+ EXPECT_EQ(RegionCode::UN001(), region_code);
1622
+ }
1623
+
1624
+ TEST_F(PhoneNumberUtilTest, GetRegionCodeForNumber) {
1625
+ string region_code;
1626
+ PhoneNumber bs_number;
1627
+ bs_number.set_country_code(1);
1628
+ bs_number.set_national_number(2423232345ULL);
1629
+ phone_util_.GetRegionCodeForNumber(bs_number, &region_code);
1630
+ EXPECT_EQ(RegionCode::BS(), region_code);
1631
+
1632
+ PhoneNumber us_number;
1633
+ us_number.set_country_code(1);
1634
+ us_number.set_national_number(4241231234ULL);
1635
+ phone_util_.GetRegionCodeForNumber(us_number, &region_code);
1636
+ EXPECT_EQ(RegionCode::US(), region_code);
1637
+
1638
+ PhoneNumber gb_mobile;
1639
+ gb_mobile.set_country_code(44);
1640
+ gb_mobile.set_national_number(7912345678ULL);
1641
+ phone_util_.GetRegionCodeForNumber(gb_mobile, &region_code);
1642
+ EXPECT_EQ(RegionCode::GB(), region_code);
1643
+
1644
+ PhoneNumber intl_toll_free_number;
1645
+ intl_toll_free_number.set_country_code(800);
1646
+ intl_toll_free_number.set_national_number(12345678ULL);
1647
+ phone_util_.GetRegionCodeForNumber(intl_toll_free_number, &region_code);
1648
+ EXPECT_EQ(RegionCode::UN001(), region_code);
1649
+
1650
+ PhoneNumber universal_premium_rate;
1651
+ universal_premium_rate.set_country_code(979);
1652
+ universal_premium_rate.set_national_number(123456789ULL);
1653
+ phone_util_.GetRegionCodeForNumber(universal_premium_rate, &region_code);
1654
+ EXPECT_EQ(RegionCode::UN001(), region_code);
1655
+ }
1656
+
1657
+ TEST_F(PhoneNumberUtilTest, IsPossibleNumber) {
1658
+ PhoneNumber number;
1659
+ number.set_country_code(1);
1660
+ number.set_national_number(6502530000ULL);
1661
+ EXPECT_TRUE(phone_util_.IsPossibleNumber(number));
1662
+
1663
+ number.set_country_code(1);
1664
+ number.set_national_number(2530000ULL);
1665
+ EXPECT_TRUE(phone_util_.IsPossibleNumber(number));
1666
+
1667
+ number.set_country_code(44);
1668
+ number.set_national_number(2070313000ULL);
1669
+ EXPECT_TRUE(phone_util_.IsPossibleNumber(number));
1670
+
1671
+ number.set_country_code(800);
1672
+ number.set_national_number(12345678ULL);
1673
+ EXPECT_TRUE(phone_util_.IsPossibleNumber(number));
1674
+
1675
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+1 650 253 0000",
1676
+ RegionCode::US()));
1677
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+1 650 GOO OGLE",
1678
+ RegionCode::US()));
1679
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("(650) 253-0000",
1680
+ RegionCode::US()));
1681
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("253-0000",
1682
+ RegionCode::US()));
1683
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+1 650 253 0000",
1684
+ RegionCode::GB()));
1685
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+44 20 7031 3000",
1686
+ RegionCode::GB()));
1687
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("(020) 7031 3000",
1688
+ RegionCode::GB()));
1689
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("7031 3000",
1690
+ RegionCode::GB()));
1691
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("3331 6005",
1692
+ RegionCode::NZ()));
1693
+ EXPECT_TRUE(phone_util_.IsPossibleNumberForString("+800 1234 5678",
1694
+ RegionCode::UN001()));
1695
+ }
1696
+
1697
+ TEST_F(PhoneNumberUtilTest, IsPossibleNumberWithReason) {
1698
+ // FYI, national numbers for country code +1 that are within 7 to 10 digits
1699
+ // are possible.
1700
+ PhoneNumber number;
1701
+ number.set_country_code(1);
1702
+ number.set_national_number(6502530000ULL);
1703
+ EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
1704
+ phone_util_.IsPossibleNumberWithReason(number));
1705
+
1706
+ number.set_country_code(1);
1707
+ number.set_national_number(2530000ULL);
1708
+ EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
1709
+ phone_util_.IsPossibleNumberWithReason(number));
1710
+
1711
+ number.set_country_code(0);
1712
+ number.set_national_number(2530000ULL);
1713
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE,
1714
+ phone_util_.IsPossibleNumberWithReason(number));
1715
+
1716
+ number.set_country_code(1);
1717
+ number.set_national_number(253000ULL);
1718
+ EXPECT_EQ(PhoneNumberUtil::TOO_SHORT,
1719
+ phone_util_.IsPossibleNumberWithReason(number));
1720
+
1721
+ number.set_country_code(1);
1722
+ number.set_national_number(65025300000ULL);
1723
+ EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
1724
+ phone_util_.IsPossibleNumberWithReason(number));
1725
+
1726
+ number.set_country_code(44);
1727
+ number.set_national_number(2070310000ULL);
1728
+ EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
1729
+ phone_util_.IsPossibleNumberWithReason(number));
1730
+
1731
+ number.set_country_code(49);
1732
+ number.set_national_number(30123456ULL);
1733
+ EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
1734
+ phone_util_.IsPossibleNumberWithReason(number));
1735
+
1736
+ number.set_country_code(65);
1737
+ number.set_national_number(1234567890ULL);
1738
+ EXPECT_EQ(PhoneNumberUtil::IS_POSSIBLE,
1739
+ phone_util_.IsPossibleNumberWithReason(number));
1740
+
1741
+ number.set_country_code(800);
1742
+ number.set_national_number(123456789ULL);
1743
+ EXPECT_EQ(PhoneNumberUtil::TOO_LONG,
1744
+ phone_util_.IsPossibleNumberWithReason(number));
1745
+ }
1746
+
1747
+ TEST_F(PhoneNumberUtilTest, IsNotPossibleNumber) {
1748
+ PhoneNumber number;
1749
+ number.set_country_code(1);
1750
+ number.set_national_number(65025300000ULL);
1751
+ EXPECT_FALSE(phone_util_.IsPossibleNumber(number));
1752
+
1753
+ number.set_country_code(800);
1754
+ number.set_national_number(123456789ULL);
1755
+ EXPECT_FALSE(phone_util_.IsPossibleNumber(number));
1756
+
1757
+ number.set_country_code(1);
1758
+ number.set_national_number(253000ULL);
1759
+ EXPECT_FALSE(phone_util_.IsPossibleNumber(number));
1760
+
1761
+ number.set_country_code(44);
1762
+ number.set_national_number(300ULL);
1763
+ EXPECT_FALSE(phone_util_.IsPossibleNumber(number));
1764
+
1765
+ EXPECT_FALSE(phone_util_.IsPossibleNumberForString("+1 650 253 00000",
1766
+ RegionCode::US()));
1767
+ EXPECT_FALSE(phone_util_.IsPossibleNumberForString("(650) 253-00000",
1768
+ RegionCode::US()));
1769
+ EXPECT_FALSE(phone_util_.IsPossibleNumberForString("I want a Pizza",
1770
+ RegionCode::US()));
1771
+ EXPECT_FALSE(phone_util_.IsPossibleNumberForString("253-000",
1772
+ RegionCode::US()));
1773
+ EXPECT_FALSE(phone_util_.IsPossibleNumberForString("1 3000",
1774
+ RegionCode::GB()));
1775
+ EXPECT_FALSE(phone_util_.IsPossibleNumberForString("+44 300",
1776
+ RegionCode::GB()));
1777
+ EXPECT_FALSE(phone_util_.IsPossibleNumberForString("+800 1234 5678 9",
1778
+ RegionCode::UN001()));
1779
+ }
1780
+
1781
+ TEST_F(PhoneNumberUtilTest, TruncateTooLongNumber) {
1782
+ // US number 650-253-0000, but entered with one additional digit at the end.
1783
+ PhoneNumber too_long_number;
1784
+ too_long_number.set_country_code(1);
1785
+ too_long_number.set_national_number(65025300001ULL);
1786
+ PhoneNumber valid_number;
1787
+ valid_number.set_country_code(1);
1788
+ valid_number.set_national_number(6502530000ULL);
1789
+ EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&too_long_number));
1790
+ EXPECT_EQ(valid_number, too_long_number);
1791
+
1792
+ too_long_number.set_country_code(800);
1793
+ too_long_number.set_national_number(123456789ULL);
1794
+ valid_number.set_country_code(800);
1795
+ valid_number.set_national_number(12345678ULL);
1796
+ EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&too_long_number));
1797
+ EXPECT_EQ(valid_number, too_long_number);
1798
+
1799
+ // GB number 080 1234 5678, but entered with 4 extra digits at the end.
1800
+ too_long_number.set_country_code(44);
1801
+ too_long_number.set_national_number(80123456780123ULL);
1802
+ valid_number.set_country_code(44);
1803
+ valid_number.set_national_number(8012345678ULL);
1804
+ EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&too_long_number));
1805
+ EXPECT_EQ(valid_number, too_long_number);
1806
+
1807
+ // IT number 022 3456 7890, but entered with 3 extra digits at the end.
1808
+ too_long_number.set_country_code(39);
1809
+ too_long_number.set_national_number(2234567890123ULL);
1810
+ too_long_number.set_italian_leading_zero(true);
1811
+ valid_number.set_country_code(39);
1812
+ valid_number.set_national_number(2234567890ULL);
1813
+ valid_number.set_italian_leading_zero(true);
1814
+ EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&too_long_number));
1815
+ EXPECT_EQ(valid_number, too_long_number);
1816
+
1817
+ // Tests what happens when a valid number is passed in.
1818
+ PhoneNumber valid_number_copy(valid_number);
1819
+ EXPECT_TRUE(phone_util_.TruncateTooLongNumber(&valid_number));
1820
+ // Tests the number is not modified.
1821
+ EXPECT_EQ(valid_number_copy, valid_number);
1822
+
1823
+ // Tests what happens when a number with invalid prefix is passed in.
1824
+ PhoneNumber number_with_invalid_prefix;
1825
+ number_with_invalid_prefix.set_country_code(1);
1826
+ // The test metadata says US numbers cannot have prefix 240.
1827
+ number_with_invalid_prefix.set_national_number(2401234567ULL);
1828
+ PhoneNumber invalid_number_copy(number_with_invalid_prefix);
1829
+ EXPECT_FALSE(phone_util_.TruncateTooLongNumber(&number_with_invalid_prefix));
1830
+ // Tests the number is not modified.
1831
+ EXPECT_EQ(invalid_number_copy, number_with_invalid_prefix);
1832
+
1833
+ // Tests what happens when a too short number is passed in.
1834
+ PhoneNumber too_short_number;
1835
+ too_short_number.set_country_code(1);
1836
+ too_short_number.set_national_number(1234ULL);
1837
+ PhoneNumber too_short_number_copy(too_short_number);
1838
+ EXPECT_FALSE(phone_util_.TruncateTooLongNumber(&too_short_number));
1839
+ // Tests the number is not modified.
1840
+ EXPECT_EQ(too_short_number_copy, too_short_number);
1841
+ }
1842
+
1843
+ TEST_F(PhoneNumberUtilTest, IsNumberGeographical) {
1844
+ PhoneNumber number;
1845
+
1846
+ number.set_country_code(1);
1847
+ number.set_national_number(2423570000ULL);
1848
+ EXPECT_FALSE(IsNumberGeographical(number)); // Bahamas, mobile phone number.
1849
+
1850
+ number.set_country_code(61);
1851
+ number.set_national_number(236618300ULL);
1852
+ EXPECT_TRUE(IsNumberGeographical(number)); // Australian fixed line number.
1853
+
1854
+ number.set_country_code(800);
1855
+ number.set_national_number(12345678ULL);
1856
+ EXPECT_FALSE(IsNumberGeographical(number)); // Internation toll free number.
1857
+ }
1858
+
1859
+ TEST_F(PhoneNumberUtilTest, IsLeadingZeroPossible) {
1860
+ EXPECT_TRUE(IsLeadingZeroPossible(39)); // Italy
1861
+ EXPECT_FALSE(IsLeadingZeroPossible(1)); // USA
1862
+ EXPECT_TRUE(IsLeadingZeroPossible(800)); // International toll free
1863
+ EXPECT_FALSE(IsLeadingZeroPossible(979)); // International premium-rate
1864
+ EXPECT_FALSE(IsLeadingZeroPossible(888)); // Not in metadata file, should
1865
+ // return default value of false.
1866
+ }
1867
+
1868
+ TEST_F(PhoneNumberUtilTest, FormatInOriginalFormat) {
1869
+ PhoneNumber phone_number;
1870
+ string formatted_number;
1871
+
1872
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1873
+ phone_util_.ParseAndKeepRawInput("+442087654321", RegionCode::GB(),
1874
+ &phone_number));
1875
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
1876
+ &formatted_number);
1877
+ EXPECT_EQ("+44 20 8765 4321", formatted_number);
1878
+
1879
+ phone_number.Clear();
1880
+ formatted_number.clear();
1881
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1882
+ phone_util_.ParseAndKeepRawInput("02087654321", RegionCode::GB(),
1883
+ &phone_number));
1884
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
1885
+ &formatted_number);
1886
+ EXPECT_EQ("(020) 8765 4321", formatted_number);
1887
+
1888
+ phone_number.Clear();
1889
+ formatted_number.clear();
1890
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1891
+ phone_util_.ParseAndKeepRawInput("011442087654321",
1892
+ RegionCode::US(), &phone_number));
1893
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
1894
+ &formatted_number);
1895
+ EXPECT_EQ("011 44 20 8765 4321", formatted_number);
1896
+
1897
+ phone_number.Clear();
1898
+ formatted_number.clear();
1899
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1900
+ phone_util_.ParseAndKeepRawInput("442087654321", RegionCode::GB(),
1901
+ &phone_number));
1902
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
1903
+ &formatted_number);
1904
+ EXPECT_EQ("44 20 8765 4321", formatted_number);
1905
+
1906
+ phone_number.Clear();
1907
+ formatted_number.clear();
1908
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1909
+ phone_util_.Parse("+442087654321", RegionCode::GB(),
1910
+ &phone_number));
1911
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
1912
+ &formatted_number);
1913
+ EXPECT_EQ("(020) 8765 4321", formatted_number);
1914
+
1915
+ // Invalid numbers that we have a formatting pattern for should be formatted
1916
+ // properly. Note area codes starting with 7 are intentionally excluded in
1917
+ // the test metadata for testing purposes.
1918
+ phone_number.Clear();
1919
+ formatted_number.clear();
1920
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1921
+ phone_util_.ParseAndKeepRawInput("7345678901", RegionCode::US(),
1922
+ &phone_number));
1923
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
1924
+ &formatted_number);
1925
+ EXPECT_EQ("734 567 8901", formatted_number);
1926
+
1927
+ // US is not a leading zero country, and the presence of the leading zero
1928
+ // leads us to format the number using raw_input.
1929
+ phone_number.Clear();
1930
+ formatted_number.clear();
1931
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1932
+ phone_util_.ParseAndKeepRawInput("0734567 8901", RegionCode::US(),
1933
+ &phone_number));
1934
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
1935
+ &formatted_number);
1936
+ EXPECT_EQ("0734567 8901", formatted_number);
1937
+
1938
+ // This number is valid, but we don't have a formatting pattern for it. Fall
1939
+ // back to the raw input.
1940
+ phone_number.Clear();
1941
+ formatted_number.clear();
1942
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1943
+ phone_util_.ParseAndKeepRawInput("02-4567-8900", RegionCode::KR(),
1944
+ &phone_number));
1945
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::KR(),
1946
+ &formatted_number);
1947
+ EXPECT_EQ("02-4567-8900", formatted_number);
1948
+
1949
+ phone_number.Clear();
1950
+ formatted_number.clear();
1951
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1952
+ phone_util_.ParseAndKeepRawInput("01180012345678",
1953
+ RegionCode::US(), &phone_number));
1954
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
1955
+ &formatted_number);
1956
+ EXPECT_EQ("011 800 1234 5678", formatted_number);
1957
+
1958
+ phone_number.Clear();
1959
+ formatted_number.clear();
1960
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1961
+ phone_util_.ParseAndKeepRawInput("+80012345678", RegionCode::KR(),
1962
+ &phone_number));
1963
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::KR(),
1964
+ &formatted_number);
1965
+ EXPECT_EQ("+800 1234 5678", formatted_number);
1966
+
1967
+ // US local numbers are formatted correctly, as we have formatting patterns
1968
+ // for them.
1969
+ phone_number.Clear();
1970
+ formatted_number.clear();
1971
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1972
+ phone_util_.ParseAndKeepRawInput("2530000", RegionCode::US(),
1973
+ &phone_number));
1974
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
1975
+ &formatted_number);
1976
+ EXPECT_EQ("253 0000", formatted_number);
1977
+
1978
+ phone_number.Clear();
1979
+ formatted_number.clear();
1980
+ // Number with national prefix in the US.
1981
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1982
+ phone_util_.ParseAndKeepRawInput("18003456789", RegionCode::US(),
1983
+ &phone_number));
1984
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
1985
+ &formatted_number);
1986
+ EXPECT_EQ("1 800 345 6789", formatted_number);
1987
+
1988
+ phone_number.Clear();
1989
+ formatted_number.clear();
1990
+ // Number without national prefix in the UK.
1991
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
1992
+ phone_util_.ParseAndKeepRawInput("2087654321", RegionCode::GB(),
1993
+ &phone_number));
1994
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
1995
+ &formatted_number);
1996
+ EXPECT_EQ("20 8765 4321", formatted_number);
1997
+ // Make sure no metadata is modified as a result of the previous function
1998
+ // call.
1999
+ phone_number.Clear();
2000
+ formatted_number.clear();
2001
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2002
+ phone_util_.Parse("+442087654321", RegionCode::GB(),
2003
+ &phone_number));
2004
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::GB(),
2005
+ &formatted_number);
2006
+ EXPECT_EQ("(020) 8765 4321", formatted_number);
2007
+
2008
+ phone_number.Clear();
2009
+ formatted_number.clear();
2010
+ // Number with national prefix in Mexico.
2011
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2012
+ phone_util_.ParseAndKeepRawInput("013312345678", RegionCode::MX(),
2013
+ &phone_number));
2014
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::MX(),
2015
+ &formatted_number);
2016
+ EXPECT_EQ("01 33 1234 5678", formatted_number);
2017
+
2018
+ phone_number.Clear();
2019
+ formatted_number.clear();
2020
+ // Number without national prefix in Mexico.
2021
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2022
+ phone_util_.ParseAndKeepRawInput("3312345678", RegionCode::MX(),
2023
+ &phone_number));
2024
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::MX(),
2025
+ &formatted_number);
2026
+ EXPECT_EQ("33 1234 5678", formatted_number);
2027
+
2028
+ phone_number.Clear();
2029
+ formatted_number.clear();
2030
+ // Italian fixed-line number.
2031
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2032
+ phone_util_.ParseAndKeepRawInput("0212345678", RegionCode::IT(),
2033
+ &phone_number));
2034
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::IT(),
2035
+ &formatted_number);
2036
+ EXPECT_EQ("02 1234 5678", formatted_number);
2037
+
2038
+ phone_number.Clear();
2039
+ formatted_number.clear();
2040
+ // Number with national prefix in Japan.
2041
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2042
+ phone_util_.ParseAndKeepRawInput("00777012", RegionCode::JP(),
2043
+ &phone_number));
2044
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::JP(),
2045
+ &formatted_number);
2046
+ EXPECT_EQ("0077-7012", formatted_number);
2047
+
2048
+ phone_number.Clear();
2049
+ formatted_number.clear();
2050
+ // Number without national prefix in Japan.
2051
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2052
+ phone_util_.ParseAndKeepRawInput("0777012", RegionCode::JP(),
2053
+ &phone_number));
2054
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::JP(),
2055
+ &formatted_number);
2056
+ EXPECT_EQ("0777012", formatted_number);
2057
+
2058
+ phone_number.Clear();
2059
+ formatted_number.clear();
2060
+ // Number with carrier code in Brazil.
2061
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2062
+ phone_util_.ParseAndKeepRawInput("012 3121286979", RegionCode::BR(),
2063
+ &phone_number));
2064
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::BR(),
2065
+ &formatted_number);
2066
+ EXPECT_EQ("012 3121286979", formatted_number);
2067
+
2068
+ phone_number.Clear();
2069
+ formatted_number.clear();
2070
+ // The default national prefix used in this case is 045. When a number with
2071
+ // national prefix 044 is entered, we return the raw input as we don't want to
2072
+ // change the number entered.
2073
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2074
+ phone_util_.ParseAndKeepRawInput("044(33)1234-5678",
2075
+ RegionCode::MX(),
2076
+ &phone_number));
2077
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::MX(),
2078
+ &formatted_number);
2079
+ EXPECT_EQ("044(33)1234-5678", formatted_number);
2080
+
2081
+ phone_number.Clear();
2082
+ formatted_number.clear();
2083
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2084
+ phone_util_.ParseAndKeepRawInput("045(33)1234-5678",
2085
+ RegionCode::MX(),
2086
+ &phone_number));
2087
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::MX(),
2088
+ &formatted_number);
2089
+ EXPECT_EQ("045 33 1234 5678", formatted_number);
2090
+
2091
+ // The default international prefix used in this case is 0011. When a number
2092
+ // with international prefix 0012 is entered, we return the raw input as we
2093
+ // don't want to change the number entered.
2094
+ phone_number.Clear();
2095
+ formatted_number.clear();
2096
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2097
+ phone_util_.ParseAndKeepRawInput("0012 16502530000",
2098
+ RegionCode::AU(),
2099
+ &phone_number));
2100
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::AU(),
2101
+ &formatted_number);
2102
+ EXPECT_EQ("0012 16502530000", formatted_number);
2103
+
2104
+ phone_number.Clear();
2105
+ formatted_number.clear();
2106
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2107
+ phone_util_.ParseAndKeepRawInput("0011 16502530000",
2108
+ RegionCode::AU(),
2109
+ &phone_number));
2110
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::AU(),
2111
+ &formatted_number);
2112
+ EXPECT_EQ("0011 1 650 253 0000", formatted_number);
2113
+
2114
+ // Test the star sign is not removed from or added to the original input by
2115
+ // this method.
2116
+ phone_number.Clear();
2117
+ formatted_number.clear();
2118
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2119
+ phone_util_.ParseAndKeepRawInput("*1234",
2120
+ RegionCode::JP(),
2121
+ &phone_number));
2122
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::JP(),
2123
+ &formatted_number);
2124
+ EXPECT_EQ("*1234", formatted_number);
2125
+ phone_number.Clear();
2126
+ formatted_number.clear();
2127
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2128
+ phone_util_.ParseAndKeepRawInput("1234",
2129
+ RegionCode::JP(),
2130
+ &phone_number));
2131
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::JP(),
2132
+ &formatted_number);
2133
+ EXPECT_EQ("1234", formatted_number);
2134
+
2135
+ // Test that an invalid national number without raw input is just formatted
2136
+ // as the national number.
2137
+ phone_number.Clear();
2138
+ formatted_number.clear();
2139
+ phone_number.set_country_code_source(PhoneNumber::FROM_DEFAULT_COUNTRY);
2140
+ phone_number.set_country_code(1);
2141
+ phone_number.set_national_number(650253000ULL);
2142
+ phone_util_.FormatInOriginalFormat(phone_number, RegionCode::US(),
2143
+ &formatted_number);
2144
+ EXPECT_EQ("650253000", formatted_number);
2145
+ }
2146
+
2147
+ TEST_F(PhoneNumberUtilTest, IsPremiumRate) {
2148
+ PhoneNumber number;
2149
+ number.set_country_code(1);
2150
+ number.set_national_number(9004433030ULL);
2151
+ EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
2152
+
2153
+ number.set_country_code(39);
2154
+ number.set_national_number(892123ULL);
2155
+ EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
2156
+
2157
+ number.set_country_code(44);
2158
+ number.set_national_number(9187654321ULL);
2159
+ EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
2160
+
2161
+ number.set_country_code(49);
2162
+ number.set_national_number(9001654321ULL);
2163
+ EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
2164
+
2165
+ number.set_country_code(49);
2166
+ number.set_national_number(90091234567ULL);
2167
+ EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
2168
+
2169
+ number.set_country_code(979);
2170
+ number.set_national_number(123456789ULL);
2171
+ EXPECT_EQ(PhoneNumberUtil::PREMIUM_RATE, phone_util_.GetNumberType(number));
2172
+ }
2173
+
2174
+ TEST_F(PhoneNumberUtilTest, IsTollFree) {
2175
+ PhoneNumber number;
2176
+ number.set_country_code(1);
2177
+ number.set_national_number(8881234567ULL);
2178
+ EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
2179
+
2180
+ number.set_country_code(39);
2181
+ number.set_national_number(803123ULL);
2182
+ EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
2183
+
2184
+ number.set_country_code(44);
2185
+ number.set_national_number(8012345678ULL);
2186
+ EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
2187
+
2188
+ number.set_country_code(49);
2189
+ number.set_national_number(8001234567ULL);
2190
+ EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
2191
+
2192
+ number.set_country_code(800);
2193
+ number.set_national_number(12345678ULL);
2194
+ EXPECT_EQ(PhoneNumberUtil::TOLL_FREE, phone_util_.GetNumberType(number));
2195
+ }
2196
+
2197
+ TEST_F(PhoneNumberUtilTest, IsMobile) {
2198
+ PhoneNumber number;
2199
+ // A Bahama mobile number
2200
+ number.set_country_code(1);
2201
+ number.set_national_number(2423570000ULL);
2202
+ EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
2203
+
2204
+ number.set_country_code(39);
2205
+ number.set_national_number(312345678ULL);
2206
+ EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
2207
+
2208
+ number.set_country_code(44);
2209
+ number.set_national_number(7912345678ULL);
2210
+ EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
2211
+
2212
+ number.set_country_code(49);
2213
+ number.set_national_number(15123456789ULL);
2214
+ EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
2215
+
2216
+ number.set_country_code(54);
2217
+ number.set_national_number(91187654321ULL);
2218
+ EXPECT_EQ(PhoneNumberUtil::MOBILE, phone_util_.GetNumberType(number));
2219
+ }
2220
+
2221
+ TEST_F(PhoneNumberUtilTest, IsFixedLine) {
2222
+ PhoneNumber number;
2223
+ // A Bahama fixed-line number
2224
+ number.set_country_code(1);
2225
+ number.set_national_number(2423651234ULL);
2226
+ EXPECT_EQ(PhoneNumberUtil::FIXED_LINE, phone_util_.GetNumberType(number));
2227
+
2228
+ // An Italian fixed-line number
2229
+ number.Clear();
2230
+ number.set_country_code(39);
2231
+ number.set_national_number(236618300ULL);
2232
+ number.set_italian_leading_zero(true);
2233
+ EXPECT_EQ(PhoneNumberUtil::FIXED_LINE, phone_util_.GetNumberType(number));
2234
+
2235
+ number.Clear();
2236
+ number.set_country_code(44);
2237
+ number.set_national_number(2012345678ULL);
2238
+ EXPECT_EQ(PhoneNumberUtil::FIXED_LINE, phone_util_.GetNumberType(number));
2239
+
2240
+ number.set_country_code(49);
2241
+ number.set_national_number(301234ULL);
2242
+ EXPECT_EQ(PhoneNumberUtil::FIXED_LINE, phone_util_.GetNumberType(number));
2243
+ }
2244
+
2245
+ TEST_F(PhoneNumberUtilTest, IsFixedLineAndMobile) {
2246
+ PhoneNumber number;
2247
+ number.set_country_code(1);
2248
+ number.set_national_number(6502531111ULL);
2249
+ EXPECT_EQ(PhoneNumberUtil::FIXED_LINE_OR_MOBILE,
2250
+ phone_util_.GetNumberType(number));
2251
+
2252
+ number.set_country_code(54);
2253
+ number.set_national_number(1987654321ULL);
2254
+ EXPECT_EQ(PhoneNumberUtil::FIXED_LINE_OR_MOBILE,
2255
+ phone_util_.GetNumberType(number));
2256
+ }
2257
+
2258
+ TEST_F(PhoneNumberUtilTest, IsSharedCost) {
2259
+ PhoneNumber number;
2260
+ number.set_country_code(44);
2261
+ number.set_national_number(8431231234ULL);
2262
+ EXPECT_EQ(PhoneNumberUtil::SHARED_COST, phone_util_.GetNumberType(number));
2263
+ }
2264
+
2265
+ TEST_F(PhoneNumberUtilTest, IsVoip) {
2266
+ PhoneNumber number;
2267
+ number.set_country_code(44);
2268
+ number.set_national_number(5631231234ULL);
2269
+ EXPECT_EQ(PhoneNumberUtil::VOIP, phone_util_.GetNumberType(number));
2270
+ }
2271
+
2272
+ TEST_F(PhoneNumberUtilTest, IsPersonalNumber) {
2273
+ PhoneNumber number;
2274
+ number.set_country_code(44);
2275
+ number.set_national_number(7031231234ULL);
2276
+ EXPECT_EQ(PhoneNumberUtil::PERSONAL_NUMBER,
2277
+ phone_util_.GetNumberType(number));
2278
+ }
2279
+
2280
+ TEST_F(PhoneNumberUtilTest, IsUnknown) {
2281
+ PhoneNumber number;
2282
+ number.set_country_code(1);
2283
+ number.set_national_number(65025311111ULL);
2284
+ EXPECT_EQ(PhoneNumberUtil::UNKNOWN, phone_util_.GetNumberType(number));
2285
+ }
2286
+
2287
+ TEST_F(PhoneNumberUtilTest, GetCountryCodeForRegion) {
2288
+ EXPECT_EQ(1, phone_util_.GetCountryCodeForRegion(RegionCode::US()));
2289
+ EXPECT_EQ(64, phone_util_.GetCountryCodeForRegion(RegionCode::NZ()));
2290
+ EXPECT_EQ(0, phone_util_.GetCountryCodeForRegion(RegionCode::GetUnknown()));
2291
+ EXPECT_EQ(0, phone_util_.GetCountryCodeForRegion(RegionCode::UN001()));
2292
+ // CS is already deprecated so the library doesn't support it.
2293
+ EXPECT_EQ(0, phone_util_.GetCountryCodeForRegion(RegionCode::CS()));
2294
+ }
2295
+
2296
+ TEST_F(PhoneNumberUtilTest, GetNationalDiallingPrefixForRegion) {
2297
+ string ndd_prefix;
2298
+ GetNddPrefixForRegion(RegionCode::US(), false, &ndd_prefix);
2299
+ EXPECT_EQ("1", ndd_prefix);
2300
+
2301
+ // Test non-main country to see it gets the national dialling prefix for the
2302
+ // main country with that country calling code.
2303
+ GetNddPrefixForRegion(RegionCode::BS(), false, &ndd_prefix);
2304
+ EXPECT_EQ("1", ndd_prefix);
2305
+
2306
+ GetNddPrefixForRegion(RegionCode::NZ(), false, &ndd_prefix);
2307
+ EXPECT_EQ("0", ndd_prefix);
2308
+
2309
+ // Test case with non digit in the national prefix.
2310
+ GetNddPrefixForRegion(RegionCode::AO(), false, &ndd_prefix);
2311
+ EXPECT_EQ("0~0", ndd_prefix);
2312
+
2313
+ GetNddPrefixForRegion(RegionCode::AO(), true, &ndd_prefix);
2314
+ EXPECT_EQ("00", ndd_prefix);
2315
+
2316
+ // Test cases with invalid regions.
2317
+ GetNddPrefixForRegion(RegionCode::GetUnknown(), false, &ndd_prefix);
2318
+ EXPECT_EQ("", ndd_prefix);
2319
+
2320
+ GetNddPrefixForRegion(RegionCode::UN001(), false, &ndd_prefix);
2321
+ EXPECT_EQ("", ndd_prefix);
2322
+
2323
+ // CS is already deprecated so the library doesn't support it.
2324
+ GetNddPrefixForRegion(RegionCode::CS(), false, &ndd_prefix);
2325
+ EXPECT_EQ("", ndd_prefix);
2326
+ }
2327
+
2328
+ TEST_F(PhoneNumberUtilTest, IsViablePhoneNumber) {
2329
+ EXPECT_FALSE(IsViablePhoneNumber("1"));
2330
+ // Only one or two digits before strange non-possible punctuation.
2331
+ EXPECT_FALSE(IsViablePhoneNumber("1+1+1"));
2332
+ EXPECT_FALSE(IsViablePhoneNumber("80+0"));
2333
+ // Two digits is viable.
2334
+ EXPECT_TRUE(IsViablePhoneNumber("00"));
2335
+ EXPECT_TRUE(IsViablePhoneNumber("111"));
2336
+ // Alpha numbers.
2337
+ EXPECT_TRUE(IsViablePhoneNumber("0800-4-pizza"));
2338
+ EXPECT_TRUE(IsViablePhoneNumber("0800-4-PIZZA"));
2339
+ // We need at least three digits before any alpha characters.
2340
+ EXPECT_FALSE(IsViablePhoneNumber("08-PIZZA"));
2341
+ EXPECT_FALSE(IsViablePhoneNumber("8-PIZZA"));
2342
+ EXPECT_FALSE(IsViablePhoneNumber("12. March"));
2343
+ }
2344
+
2345
+ TEST_F(PhoneNumberUtilTest, IsViablePhoneNumberNonAscii) {
2346
+ // Only one or two digits before possible punctuation followed by more digits.
2347
+ // The punctuation used here is the unicode character u+3000.
2348
+ EXPECT_TRUE(IsViablePhoneNumber("1\xE3\x80\x80" "34" /* "1 34" */));
2349
+ EXPECT_FALSE(IsViablePhoneNumber("1\xE3\x80\x80" "3+4" /* "1 3+4" */));
2350
+ // Unicode variants of possible starting character and other allowed
2351
+ // punctuation/digits.
2352
+ EXPECT_TRUE(IsViablePhoneNumber("\xEF\xBC\x88" "1\xEF\xBC\x89\xE3\x80\x80"
2353
+ "3456789" /* "(1) 3456789" */));
2354
+ // Testing a leading + is okay.
2355
+ EXPECT_TRUE(IsViablePhoneNumber("+1\xEF\xBC\x89\xE3\x80\x80"
2356
+ "3456789" /* "+1) 3456789" */));
2357
+ }
2358
+
2359
+ TEST_F(PhoneNumberUtilTest, ConvertAlphaCharactersInNumber) {
2360
+ string input("1800-ABC-DEF");
2361
+ phone_util_.ConvertAlphaCharactersInNumber(&input);
2362
+ // Alpha chars are converted to digits; everything else is left untouched.
2363
+ static const string kExpectedOutput = "1800-222-333";
2364
+ EXPECT_EQ(kExpectedOutput, input);
2365
+
2366
+ // Try with some non-ASCII characters.
2367
+ input.assign("1\xE3\x80\x80\xEF\xBC\x88" "800) ABC-DEF"
2368
+ /* "1 (800) ABCD-DEF" */);
2369
+ static const string kExpectedFullwidthOutput =
2370
+ "1\xE3\x80\x80\xEF\xBC\x88" "800) 222-333" /* "1 (800) 222-333" */;
2371
+ phone_util_.ConvertAlphaCharactersInNumber(&input);
2372
+ EXPECT_EQ(kExpectedFullwidthOutput, input);
2373
+ }
2374
+
2375
+ TEST_F(PhoneNumberUtilTest, NormaliseRemovePunctuation) {
2376
+ string input_number("034-56&+#2" "\xC2\xAD" "34");
2377
+ Normalize(&input_number);
2378
+ static const string kExpectedOutput("03456234");
2379
+ EXPECT_EQ(kExpectedOutput, input_number)
2380
+ << "Conversion did not correctly remove punctuation";
2381
+ }
2382
+
2383
+ TEST_F(PhoneNumberUtilTest, NormaliseReplaceAlphaCharacters) {
2384
+ string input_number("034-I-am-HUNGRY");
2385
+ Normalize(&input_number);
2386
+ static const string kExpectedOutput("034426486479");
2387
+ EXPECT_EQ(kExpectedOutput, input_number)
2388
+ << "Conversion did not correctly replace alpha characters";
2389
+ }
2390
+
2391
+ TEST_F(PhoneNumberUtilTest, NormaliseOtherDigits) {
2392
+ // The first digit is a full-width 2, the last digit is an Arabic-indic digit
2393
+ // 5.
2394
+ string input_number("\xEF\xBC\x92" "5\xD9\xA5" /* "25٥" */);
2395
+ Normalize(&input_number);
2396
+ static const string kExpectedOutput("255");
2397
+ EXPECT_EQ(kExpectedOutput, input_number)
2398
+ << "Conversion did not correctly replace non-latin digits";
2399
+ // The first digit is an Eastern-Arabic 5, the latter an Eastern-Arabic 0.
2400
+ string eastern_arabic_input_number("\xDB\xB5" "2\xDB\xB0" /* "۵2۰" */);
2401
+ Normalize(&eastern_arabic_input_number);
2402
+ static const string kExpectedOutput2("520");
2403
+ EXPECT_EQ(kExpectedOutput2, eastern_arabic_input_number)
2404
+ << "Conversion did not correctly replace non-latin digits";
2405
+ }
2406
+
2407
+ TEST_F(PhoneNumberUtilTest, NormaliseStripAlphaCharacters) {
2408
+ string input_number("034-56&+a#234");
2409
+ phone_util_.NormalizeDigitsOnly(&input_number);
2410
+ static const string kExpectedOutput("03456234");
2411
+ EXPECT_EQ(kExpectedOutput, input_number)
2412
+ << "Conversion did not correctly remove alpha characters";
2413
+ }
2414
+
2415
+ TEST_F(PhoneNumberUtilTest, NormaliseStripNonDiallableCharacters) {
2416
+ string input_number("03*4-56&+a#234");
2417
+ NormalizeDiallableCharsOnly(&input_number);
2418
+ static const string kExpectedOutput("03*456+234");
2419
+ EXPECT_EQ(kExpectedOutput, input_number)
2420
+ << "Conversion did not correctly remove non-diallable characters";
2421
+ }
2422
+
2423
+ TEST_F(PhoneNumberUtilTest, MaybeStripInternationalPrefix) {
2424
+ string international_prefix("00[39]");
2425
+ string number_to_strip("0034567700-3898003");
2426
+ // Note the dash is removed as part of the normalization.
2427
+ string stripped_number("45677003898003");
2428
+ EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_IDD,
2429
+ MaybeStripInternationalPrefixAndNormalize(international_prefix,
2430
+ &number_to_strip));
2431
+ EXPECT_EQ(stripped_number, number_to_strip)
2432
+ << "The number was not stripped of its international prefix.";
2433
+
2434
+ // Now the number no longer starts with an IDD prefix, so it should now report
2435
+ // FROM_DEFAULT_COUNTRY.
2436
+ EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY,
2437
+ MaybeStripInternationalPrefixAndNormalize(international_prefix,
2438
+ &number_to_strip));
2439
+
2440
+ number_to_strip.assign("00945677003898003");
2441
+ EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_IDD,
2442
+ MaybeStripInternationalPrefixAndNormalize(international_prefix,
2443
+ &number_to_strip));
2444
+ EXPECT_EQ(stripped_number, number_to_strip)
2445
+ << "The number was not stripped of its international prefix.";
2446
+
2447
+ // Test it works when the international prefix is broken up by spaces.
2448
+ number_to_strip.assign("00 9 45677003898003");
2449
+ EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_IDD,
2450
+ MaybeStripInternationalPrefixAndNormalize(international_prefix,
2451
+ &number_to_strip));
2452
+ EXPECT_EQ(stripped_number, number_to_strip)
2453
+ << "The number was not stripped of its international prefix.";
2454
+ // Now the number no longer starts with an IDD prefix, so it should now report
2455
+ // FROM_DEFAULT_COUNTRY.
2456
+ EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY,
2457
+ MaybeStripInternationalPrefixAndNormalize(international_prefix,
2458
+ &number_to_strip));
2459
+
2460
+ // Test the + symbol is also recognised and stripped.
2461
+ number_to_strip.assign("+45677003898003");
2462
+ stripped_number.assign("45677003898003");
2463
+ EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN,
2464
+ MaybeStripInternationalPrefixAndNormalize(international_prefix,
2465
+ &number_to_strip));
2466
+ EXPECT_EQ(stripped_number, number_to_strip)
2467
+ << "The number supplied was not stripped of the plus symbol.";
2468
+
2469
+ // If the number afterwards is a zero, we should not strip this - no country
2470
+ // code begins with 0.
2471
+ number_to_strip.assign("0090112-3123");
2472
+ stripped_number.assign("00901123123");
2473
+ EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY,
2474
+ MaybeStripInternationalPrefixAndNormalize(international_prefix,
2475
+ &number_to_strip));
2476
+ EXPECT_EQ(stripped_number, number_to_strip)
2477
+ << "The number had a 0 after the match so shouldn't be stripped.";
2478
+ // Here the 0 is separated by a space from the IDD.
2479
+ number_to_strip.assign("009 0-112-3123");
2480
+ EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY,
2481
+ MaybeStripInternationalPrefixAndNormalize(international_prefix,
2482
+ &number_to_strip));
2483
+ }
2484
+
2485
+ TEST_F(PhoneNumberUtilTest, MaybeStripNationalPrefixAndCarrierCode) {
2486
+ PhoneMetadata metadata;
2487
+ metadata.set_national_prefix_for_parsing("34");
2488
+ metadata.mutable_general_desc()->set_national_number_pattern("\\d{4,8}");
2489
+ string number_to_strip("34356778");
2490
+ string stripped_number("356778");
2491
+ string carrier_code;
2492
+ MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
2493
+ &carrier_code);
2494
+ EXPECT_EQ(stripped_number, number_to_strip)
2495
+ << "Should have had national prefix stripped.";
2496
+ EXPECT_EQ("", carrier_code) << "Should have had no carrier code stripped.";
2497
+ // Retry stripping - now the number should not start with the national prefix,
2498
+ // so no more stripping should occur.
2499
+ MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
2500
+ &carrier_code);
2501
+ EXPECT_EQ(stripped_number, number_to_strip)
2502
+ << "Should have had no change - no national prefix present.";
2503
+ // Some countries have no national prefix. Repeat test with none specified.
2504
+ metadata.clear_national_prefix_for_parsing();
2505
+ MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
2506
+ &carrier_code);
2507
+ EXPECT_EQ(stripped_number, number_to_strip)
2508
+ << "Should have had no change - empty national prefix.";
2509
+ // If the resultant number doesn't match the national rule, it shouldn't be
2510
+ // stripped.
2511
+ metadata.set_national_prefix_for_parsing("3");
2512
+ number_to_strip.assign("3123");
2513
+ stripped_number.assign("3123");
2514
+ MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
2515
+ &carrier_code);
2516
+ EXPECT_EQ(stripped_number, number_to_strip)
2517
+ << "Should have had no change - after stripping, it wouldn't have "
2518
+ << "matched the national rule.";
2519
+ // Test extracting carrier selection code.
2520
+ metadata.set_national_prefix_for_parsing("0(81)?");
2521
+ number_to_strip.assign("08122123456");
2522
+ stripped_number.assign("22123456");
2523
+ MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
2524
+ &carrier_code);
2525
+ EXPECT_EQ("81", carrier_code) << "Should have had carrier code stripped.";
2526
+ EXPECT_EQ(stripped_number, number_to_strip)
2527
+ << "Should have had national prefix and carrier code stripped.";
2528
+ // If there was a transform rule, check it was applied.
2529
+ metadata.set_national_prefix_transform_rule("5$15");
2530
+ // Note that a capturing group is present here.
2531
+ metadata.set_national_prefix_for_parsing("0(\\d{2})");
2532
+ number_to_strip.assign("031123");
2533
+ string transformed_number("5315123");
2534
+ MaybeStripNationalPrefixAndCarrierCode(metadata, &number_to_strip,
2535
+ &carrier_code);
2536
+ EXPECT_EQ(transformed_number, number_to_strip)
2537
+ << "Was not successfully transformed.";
2538
+ }
2539
+
2540
+ TEST_F(PhoneNumberUtilTest, MaybeStripExtension) {
2541
+ // One with extension.
2542
+ string number("1234576 ext. 1234");
2543
+ string extension;
2544
+ string expected_extension("1234");
2545
+ string stripped_number("1234576");
2546
+ EXPECT_TRUE(MaybeStripExtension(&number, &extension));
2547
+ EXPECT_EQ(stripped_number, number);
2548
+ EXPECT_EQ(expected_extension, extension);
2549
+
2550
+ // One without extension.
2551
+ number.assign("1234-576");
2552
+ extension.clear();
2553
+ stripped_number.assign("1234-576");
2554
+ EXPECT_FALSE(MaybeStripExtension(&number, &extension));
2555
+ EXPECT_EQ(stripped_number, number);
2556
+ EXPECT_TRUE(extension.empty());
2557
+
2558
+ // One with an extension caught by the second capturing group in
2559
+ // kKnownExtnPatterns.
2560
+ number.assign("1234576-123#");
2561
+ extension.clear();
2562
+ expected_extension.assign("123");
2563
+ stripped_number.assign("1234576");
2564
+ EXPECT_TRUE(MaybeStripExtension(&number, &extension));
2565
+ EXPECT_EQ(stripped_number, number);
2566
+ EXPECT_EQ(expected_extension, extension);
2567
+
2568
+ number.assign("1234576 ext.123#");
2569
+ extension.clear();
2570
+ EXPECT_TRUE(MaybeStripExtension(&number, &extension));
2571
+ EXPECT_EQ(stripped_number, number);
2572
+ EXPECT_EQ(expected_extension, extension);
2573
+ }
2574
+
2575
+ TEST_F(PhoneNumberUtilTest, MaybeExtractCountryCode) {
2576
+ PhoneNumber number;
2577
+ const PhoneMetadata* metadata = GetPhoneMetadata(RegionCode::US());
2578
+ // Note that for the US, the IDD is 011.
2579
+ string phone_number("011112-3456789");
2580
+ string stripped_number("123456789");
2581
+ int expected_country_code = 1;
2582
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2583
+ MaybeExtractCountryCode(metadata, true, &phone_number, &number));
2584
+ EXPECT_EQ(expected_country_code, number.country_code());
2585
+ EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_IDD, number.country_code_source());
2586
+ EXPECT_EQ(stripped_number, phone_number);
2587
+
2588
+ number.Clear();
2589
+ phone_number.assign("+80012345678");
2590
+ stripped_number.assign("12345678");
2591
+ expected_country_code = 800;
2592
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2593
+ MaybeExtractCountryCode(metadata, true, &phone_number, &number));
2594
+ EXPECT_EQ(expected_country_code, number.country_code());
2595
+ EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN,
2596
+ number.country_code_source());
2597
+ EXPECT_EQ(stripped_number, phone_number);
2598
+
2599
+ number.Clear();
2600
+ phone_number.assign("+6423456789");
2601
+ stripped_number.assign("23456789");
2602
+ expected_country_code = 64;
2603
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2604
+ MaybeExtractCountryCode(metadata, true, &phone_number, &number));
2605
+ EXPECT_EQ(expected_country_code, number.country_code());
2606
+ EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN,
2607
+ number.country_code_source());
2608
+ EXPECT_EQ(stripped_number, phone_number);
2609
+
2610
+ // Should not have extracted a country code - no international prefix present.
2611
+ number.Clear();
2612
+ expected_country_code = 0;
2613
+ phone_number.assign("2345-6789");
2614
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2615
+ MaybeExtractCountryCode(metadata, true, &phone_number, &number));
2616
+ EXPECT_EQ(expected_country_code, number.country_code());
2617
+ EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY, number.country_code_source());
2618
+ EXPECT_EQ(stripped_number, phone_number);
2619
+
2620
+ expected_country_code = 0;
2621
+ phone_number.assign("0119991123456789");
2622
+ stripped_number.assign(phone_number);
2623
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
2624
+ MaybeExtractCountryCode(metadata, true, &phone_number, &number));
2625
+
2626
+ number.Clear();
2627
+ phone_number.assign("(1 610) 619 4466");
2628
+ stripped_number.assign("6106194466");
2629
+ expected_country_code = 1;
2630
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2631
+ MaybeExtractCountryCode(metadata, true, &phone_number, &number));
2632
+ EXPECT_EQ(expected_country_code, number.country_code());
2633
+ EXPECT_EQ(PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN,
2634
+ number.country_code_source());
2635
+ EXPECT_EQ(stripped_number, phone_number);
2636
+
2637
+ number.Clear();
2638
+ phone_number.assign("(1 610) 619 4466");
2639
+ stripped_number.assign("6106194466");
2640
+ expected_country_code = 1;
2641
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2642
+ MaybeExtractCountryCode(metadata, false, &phone_number, &number));
2643
+ EXPECT_EQ(expected_country_code, number.country_code());
2644
+ EXPECT_FALSE(number.has_country_code_source());
2645
+ EXPECT_EQ(stripped_number, phone_number);
2646
+
2647
+ // Should not have extracted a country code - invalid number after extraction
2648
+ // of uncertain country code.
2649
+ number.Clear();
2650
+ phone_number.assign("(1 610) 619 446");
2651
+ stripped_number.assign("1610619446");
2652
+ expected_country_code = 0;
2653
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2654
+ MaybeExtractCountryCode(metadata, false, &phone_number, &number));
2655
+ EXPECT_EQ(expected_country_code, number.country_code());
2656
+ EXPECT_FALSE(number.has_country_code_source());
2657
+ EXPECT_EQ(stripped_number, phone_number);
2658
+
2659
+ number.Clear();
2660
+ phone_number.assign("(1 610) 619");
2661
+ stripped_number.assign("1610619");
2662
+ expected_country_code = 0;
2663
+ // Should not have extracted a country code - invalid number both before and
2664
+ // after extraction of uncertain country code.
2665
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2666
+ MaybeExtractCountryCode(metadata, true, &phone_number, &number));
2667
+ EXPECT_EQ(expected_country_code, number.country_code());
2668
+ EXPECT_EQ(PhoneNumber::FROM_DEFAULT_COUNTRY, number.country_code_source());
2669
+ EXPECT_EQ(stripped_number, phone_number);
2670
+ }
2671
+
2672
+ TEST_F(PhoneNumberUtilTest, CountryWithNoNumberDesc) {
2673
+ string formatted_number;
2674
+ // Andorra is a country where we don't have PhoneNumberDesc info in the
2675
+ // metadata.
2676
+ PhoneNumber ad_number;
2677
+ ad_number.set_country_code(376);
2678
+ ad_number.set_national_number(12345ULL);
2679
+ phone_util_.Format(ad_number, PhoneNumberUtil::INTERNATIONAL,
2680
+ &formatted_number);
2681
+ EXPECT_EQ("+376 12345", formatted_number);
2682
+ phone_util_.Format(ad_number, PhoneNumberUtil::E164, &formatted_number);
2683
+ EXPECT_EQ("+37612345", formatted_number);
2684
+ phone_util_.Format(ad_number, PhoneNumberUtil::NATIONAL, &formatted_number);
2685
+ EXPECT_EQ("12345", formatted_number);
2686
+ EXPECT_EQ(PhoneNumberUtil::UNKNOWN, phone_util_.GetNumberType(ad_number));
2687
+ EXPECT_FALSE(phone_util_.IsValidNumber(ad_number));
2688
+
2689
+ // Test dialing a US number from within Andorra.
2690
+ PhoneNumber us_number;
2691
+ us_number.set_country_code(1);
2692
+ us_number.set_national_number(6502530000ULL);
2693
+ phone_util_.FormatOutOfCountryCallingNumber(us_number, RegionCode::AD(),
2694
+ &formatted_number);
2695
+ EXPECT_EQ("00 1 650 253 0000", formatted_number);
2696
+ }
2697
+
2698
+ TEST_F(PhoneNumberUtilTest, UnknownCountryCallingCode) {
2699
+ PhoneNumber invalid_number;
2700
+ invalid_number.set_country_code(kInvalidCountryCode);
2701
+ invalid_number.set_national_number(12345ULL);
2702
+
2703
+ EXPECT_FALSE(phone_util_.IsValidNumber(invalid_number));
2704
+
2705
+ // It's not very well defined as to what the E164 representation for a number
2706
+ // with an invalid country calling code is, but just prefixing the country
2707
+ // code and national number is about the best we can do.
2708
+ string formatted_number;
2709
+ phone_util_.Format(invalid_number, PhoneNumberUtil::E164, &formatted_number);
2710
+ EXPECT_EQ("+212345", formatted_number);
2711
+ }
2712
+
2713
+ TEST_F(PhoneNumberUtilTest, IsNumberMatchMatches) {
2714
+ // Test simple matches where formatting is different, or leading zeros, or
2715
+ // country code has been specified.
2716
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2717
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331 6005",
2718
+ "+64 03 331 6005"));
2719
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2720
+ phone_util_.IsNumberMatchWithTwoStrings("+800 1234 5678",
2721
+ "+80012345678"));
2722
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2723
+ phone_util_.IsNumberMatchWithTwoStrings("+64 03 331-6005",
2724
+ "+64 03331 6005"));
2725
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2726
+ phone_util_.IsNumberMatchWithTwoStrings("+643 331-6005",
2727
+ "+64033316005"));
2728
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2729
+ phone_util_.IsNumberMatchWithTwoStrings("+643 331-6005",
2730
+ "+6433316005"));
2731
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2732
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
2733
+ "+6433316005"));
2734
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2735
+ phone_util_.IsNumberMatchWithTwoStrings(
2736
+ "+64 3 331-6005", "tel:+64-3-331-6005;isub=123"));
2737
+ // Test alpha numbers.
2738
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2739
+ phone_util_.IsNumberMatchWithTwoStrings("+1800 siX-Flags",
2740
+ "+1 800 7493 5247"));
2741
+ // Test numbers with extensions.
2742
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2743
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005 extn 1234",
2744
+ "+6433316005#1234"));
2745
+ // Test proto buffers.
2746
+ PhoneNumber nz_number;
2747
+ nz_number.set_country_code(64);
2748
+ nz_number.set_national_number(33316005ULL);
2749
+ nz_number.set_extension("3456");
2750
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2751
+ phone_util_.IsNumberMatchWithOneString(nz_number,
2752
+ "+643 331 6005 ext 3456"));
2753
+ nz_number.clear_extension();
2754
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2755
+ phone_util_.IsNumberMatchWithOneString(nz_number,
2756
+ "+643 331 6005"));
2757
+ // Check empty extensions are ignored.
2758
+ nz_number.set_extension("");
2759
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2760
+ phone_util_.IsNumberMatchWithOneString(nz_number,
2761
+ "+643 331 6005"));
2762
+ // Check variant with two proto buffers.
2763
+ PhoneNumber nz_number_2;
2764
+ nz_number_2.set_country_code(64);
2765
+ nz_number_2.set_national_number(33316005ULL);
2766
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2767
+ phone_util_.IsNumberMatch(nz_number, nz_number_2));
2768
+
2769
+ // Check raw_input, country_code_source and preferred_domestic_carrier_code
2770
+ // are ignored.
2771
+ PhoneNumber br_number_1;
2772
+ PhoneNumber br_number_2;
2773
+ br_number_1.set_country_code(55);
2774
+ br_number_1.set_national_number(3121286979ULL);
2775
+ br_number_1.set_country_code_source(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN);
2776
+ br_number_1.set_preferred_domestic_carrier_code("12");
2777
+ br_number_1.set_raw_input("012 3121286979");
2778
+ br_number_2.set_country_code(55);
2779
+ br_number_2.set_national_number(3121286979ULL);
2780
+ br_number_2.set_country_code_source(PhoneNumber::FROM_DEFAULT_COUNTRY);
2781
+ br_number_2.set_preferred_domestic_carrier_code("14");
2782
+ br_number_2.set_raw_input("143121286979");
2783
+ EXPECT_EQ(PhoneNumberUtil::EXACT_MATCH,
2784
+ phone_util_.IsNumberMatch(br_number_1, br_number_2));
2785
+ }
2786
+
2787
+ TEST_F(PhoneNumberUtilTest, IsNumberMatchNonMatches) {
2788
+ // NSN matches.
2789
+ EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
2790
+ phone_util_.IsNumberMatchWithTwoStrings("03 331 6005",
2791
+ "03 331 6006"));
2792
+ EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
2793
+ phone_util_.IsNumberMatchWithTwoStrings("+800 1234 5678",
2794
+ "+1 800 1234 5678"));
2795
+ // Different country code, partial number match.
2796
+ EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
2797
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
2798
+ "+16433316005"));
2799
+ // Different country code, same number.
2800
+ EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
2801
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
2802
+ "+6133316005"));
2803
+ // Extension different, all else the same.
2804
+ EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
2805
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005 extn 1234",
2806
+ "+0116433316005#1235"));
2807
+ EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
2808
+ phone_util_.IsNumberMatchWithTwoStrings(
2809
+ "+64 3 331-6005 extn 1234", "tel:+64-3-331-6005;ext=1235"));
2810
+ // NSN matches, but extension is different - not the same number.
2811
+ EXPECT_EQ(PhoneNumberUtil::NO_MATCH,
2812
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005 ext.1235",
2813
+ "3 331 6005#1234"));
2814
+ // Invalid numbers that can't be parsed.
2815
+ EXPECT_EQ(PhoneNumberUtil::INVALID_NUMBER,
2816
+ phone_util_.IsNumberMatchWithTwoStrings("4", "3 331 6043"));
2817
+ // Invalid numbers that can't be parsed.
2818
+ EXPECT_EQ(PhoneNumberUtil::INVALID_NUMBER,
2819
+ phone_util_.IsNumberMatchWithTwoStrings("+43", "+64 3 331 6005"));
2820
+ EXPECT_EQ(PhoneNumberUtil::INVALID_NUMBER,
2821
+ phone_util_.IsNumberMatchWithTwoStrings("+43", "64 3 331 6005"));
2822
+ EXPECT_EQ(PhoneNumberUtil::INVALID_NUMBER,
2823
+ phone_util_.IsNumberMatchWithTwoStrings("Dog", "64 3 331 6005"));
2824
+ }
2825
+
2826
+ TEST_F(PhoneNumberUtilTest, IsNumberMatchNsnMatches) {
2827
+ // NSN matches.
2828
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2829
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
2830
+ "03 331 6005"));
2831
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2832
+ phone_util_.IsNumberMatchWithTwoStrings(
2833
+ "+64 3 331-6005",
2834
+ "tel:03-331-6005;isub=1234;phone-context=abc.nz"));
2835
+
2836
+ PhoneNumber nz_number;
2837
+ nz_number.set_country_code(64);
2838
+ nz_number.set_national_number(33316005ULL);
2839
+ nz_number.set_extension("");
2840
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2841
+ phone_util_.IsNumberMatchWithOneString(nz_number, "03 331 6005"));
2842
+ // Here the second number possibly starts with the country code for New
2843
+ // Zealand, although we are unsure.
2844
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2845
+ phone_util_.IsNumberMatchWithOneString(nz_number,
2846
+ "(64-3) 331 6005"));
2847
+
2848
+ // Here, the 1 might be a national prefix, if we compare it to the US number,
2849
+ // so the resultant match is an NSN match.
2850
+ PhoneNumber us_number;
2851
+ us_number.set_country_code(1);
2852
+ us_number.set_national_number(2345678901ULL);
2853
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2854
+ phone_util_.IsNumberMatchWithOneString(us_number,
2855
+ "1-234-567-8901"));
2856
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2857
+ phone_util_.IsNumberMatchWithOneString(us_number, "2345678901"));
2858
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2859
+ phone_util_.IsNumberMatchWithTwoStrings("+1 234-567 8901",
2860
+ "1 234 567 8901"));
2861
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2862
+ phone_util_.IsNumberMatchWithTwoStrings("1 234-567 8901",
2863
+ "1 234 567 8901"));
2864
+ EXPECT_EQ(PhoneNumberUtil::NSN_MATCH,
2865
+ phone_util_.IsNumberMatchWithTwoStrings("1 234-567 8901",
2866
+ "+1 234 567 8901"));
2867
+ // For this case, the match will be a short NSN match, because we cannot
2868
+ // assume that the 1 might be a national prefix, so don't remove it when
2869
+ // parsing.
2870
+ PhoneNumber random_number;
2871
+ random_number.set_country_code(41);
2872
+ random_number.set_national_number(2345678901ULL);
2873
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2874
+ phone_util_.IsNumberMatchWithOneString(random_number,
2875
+ "1-234-567-8901"));
2876
+ }
2877
+
2878
+ TEST_F(PhoneNumberUtilTest, IsNumberMatchShortNsnMatches) {
2879
+ // Short NSN matches with the country not specified for either one or both
2880
+ // numbers.
2881
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2882
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
2883
+ "331 6005"));
2884
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2885
+ phone_util_.IsNumberMatchWithTwoStrings(
2886
+ "+64 3 331-6005", "tel:331-6005;phone-context=abc.nz"));
2887
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2888
+ phone_util_.IsNumberMatchWithTwoStrings(
2889
+ "+64 3 331-6005",
2890
+ "tel:331-6005;isub=1234;phone-context=abc.nz"));
2891
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2892
+ phone_util_.IsNumberMatchWithTwoStrings(
2893
+ "+64 3 331-6005",
2894
+ "tel:331-6005;isub=1234;phone-context=abc.nz;a=%A1"));
2895
+
2896
+ // We did not know that the "0" was a national prefix since neither number has
2897
+ // a country code, so this is considered a SHORT_NSN_MATCH.
2898
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2899
+ phone_util_.IsNumberMatchWithTwoStrings("3 331-6005",
2900
+ "03 331 6005"));
2901
+
2902
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2903
+ phone_util_.IsNumberMatchWithTwoStrings("3 331-6005",
2904
+ "331 6005"));
2905
+
2906
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2907
+ phone_util_.IsNumberMatchWithTwoStrings(
2908
+ "3 331-6005", "tel:331-6005;phone-context=abc.nz"));
2909
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2910
+ phone_util_.IsNumberMatchWithTwoStrings("3 331-6005",
2911
+ "+64 331 6005"));
2912
+
2913
+ // Short NSN match with the country specified.
2914
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2915
+ phone_util_.IsNumberMatchWithTwoStrings("03 331-6005",
2916
+ "331 6005"));
2917
+
2918
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2919
+ phone_util_.IsNumberMatchWithTwoStrings("1 234 345 6789",
2920
+ "345 6789"));
2921
+
2922
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2923
+ phone_util_.IsNumberMatchWithTwoStrings("+1 (234) 345 6789",
2924
+ "345 6789"));
2925
+
2926
+ // NSN matches, country code omitted for one number, extension missing for
2927
+ // one.
2928
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2929
+ phone_util_.IsNumberMatchWithTwoStrings("+64 3 331-6005",
2930
+ "3 331 6005#1234"));
2931
+
2932
+ // One has Italian leading zero, one does not.
2933
+ PhoneNumber it_number_1, it_number_2;
2934
+ it_number_1.set_country_code(39);
2935
+ it_number_1.set_national_number(1234ULL);
2936
+ it_number_1.set_italian_leading_zero(true);
2937
+ it_number_2.set_country_code(39);
2938
+ it_number_2.set_national_number(1234ULL);
2939
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2940
+ phone_util_.IsNumberMatch(it_number_1, it_number_2));
2941
+
2942
+ // One has an extension, the other has an extension of "".
2943
+ it_number_1.set_extension("1234");
2944
+ it_number_1.clear_italian_leading_zero();
2945
+ it_number_2.set_extension("");
2946
+ EXPECT_EQ(PhoneNumberUtil::SHORT_NSN_MATCH,
2947
+ phone_util_.IsNumberMatch(it_number_1, it_number_2));
2948
+ }
2949
+
2950
+ TEST_F(PhoneNumberUtilTest, ParseNationalNumber) {
2951
+ PhoneNumber nz_number;
2952
+ nz_number.set_country_code(64);
2953
+ nz_number.set_national_number(33316005ULL);
2954
+ PhoneNumber test_number;
2955
+ // National prefix attached.
2956
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2957
+ phone_util_.Parse("033316005", RegionCode::NZ(), &test_number));
2958
+ EXPECT_EQ(nz_number, test_number);
2959
+ // National prefix missing.
2960
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2961
+ phone_util_.Parse("33316005", RegionCode::NZ(), &test_number));
2962
+ EXPECT_EQ(nz_number, test_number);
2963
+ // National prefix attached and some formatting present.
2964
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2965
+ phone_util_.Parse("03-331 6005", RegionCode::NZ(), &test_number));
2966
+ EXPECT_EQ(nz_number, test_number);
2967
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2968
+ phone_util_.Parse("03 331 6005", RegionCode::NZ(), &test_number));
2969
+ EXPECT_EQ(nz_number, test_number);
2970
+ // Test parsing RFC3966 format with a phone context.
2971
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2972
+ phone_util_.Parse("tel:03-331-6005;phone-context=+64",
2973
+ RegionCode::NZ(), &test_number));
2974
+ EXPECT_EQ(nz_number, test_number);
2975
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2976
+ phone_util_.Parse("tel:331-6005;phone-context=+64-3",
2977
+ RegionCode::NZ(), &test_number));
2978
+ EXPECT_EQ(nz_number, test_number);
2979
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2980
+ phone_util_.Parse("tel:331-6005;phone-context=+64-3",
2981
+ RegionCode::US(), &test_number));
2982
+ EXPECT_EQ(nz_number, test_number);
2983
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2984
+ phone_util_.Parse("My number is tel:03-331-6005;phone-context=+64",
2985
+ RegionCode::NZ(), &test_number));
2986
+ EXPECT_EQ(nz_number, test_number);
2987
+ // Test parsing RFC3966 format with optional user-defined parameters. The
2988
+ // parameters will appear after the context if present.
2989
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2990
+ phone_util_.Parse("tel:03-331-6005;phone-context=+64;a=%A1",
2991
+ RegionCode::NZ(), &test_number));
2992
+ EXPECT_EQ(nz_number, test_number);
2993
+ // Test parsing RFC3966 with an ISDN subaddress.
2994
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2995
+ phone_util_.Parse("tel:03-331-6005;isub=12345;phone-context=+64",
2996
+ RegionCode::NZ(), &test_number));
2997
+ EXPECT_EQ(nz_number, test_number);
2998
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
2999
+ phone_util_.Parse("tel:+64-3-331-6005;isub=12345",
3000
+ RegionCode::US(), &test_number));
3001
+ EXPECT_EQ(nz_number, test_number);
3002
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3003
+ phone_util_.Parse("03-331-6005;phone-context=+64",
3004
+ RegionCode::NZ(), &test_number));
3005
+ EXPECT_EQ(nz_number, test_number);
3006
+ // Testing international prefixes.
3007
+ // Should strip country code.
3008
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3009
+ phone_util_.Parse("0064 3 331 6005",
3010
+ RegionCode::NZ(), &test_number));
3011
+ EXPECT_EQ(nz_number, test_number);
3012
+ // Try again, but this time we have an international number with Region Code
3013
+ // US. It should recognise the country code and parse accordingly.
3014
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3015
+ phone_util_.Parse("01164 3 331 6005",
3016
+ RegionCode::US(), &test_number));
3017
+ EXPECT_EQ(nz_number, test_number);
3018
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3019
+ phone_util_.Parse("+64 3 331 6005",
3020
+ RegionCode::US(), &test_number));
3021
+ EXPECT_EQ(nz_number, test_number);
3022
+ // We should ignore the leading plus here, since it is not followed by a valid
3023
+ // country code but instead is followed by the IDD for the US.
3024
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3025
+ phone_util_.Parse("+01164 3 331 6005",
3026
+ RegionCode::US(), &test_number));
3027
+ EXPECT_EQ(nz_number, test_number);
3028
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3029
+ phone_util_.Parse("+0064 3 331 6005",
3030
+ RegionCode::NZ(), &test_number));
3031
+ EXPECT_EQ(nz_number, test_number);
3032
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3033
+ phone_util_.Parse("+ 00 64 3 331 6005",
3034
+ RegionCode::NZ(), &test_number));
3035
+ EXPECT_EQ(nz_number, test_number);
3036
+
3037
+ PhoneNumber us_local_number;
3038
+ us_local_number.set_country_code(1);
3039
+ us_local_number.set_national_number(2530000ULL);
3040
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3041
+ phone_util_.Parse("tel:253-0000;phone-context=www.google.com",
3042
+ RegionCode::US(), &test_number));
3043
+ EXPECT_EQ(us_local_number, test_number);
3044
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3045
+ phone_util_.Parse(
3046
+ "tel:253-0000;isub=12345;phone-context=www.google.com",
3047
+ RegionCode::US(), &test_number));
3048
+ EXPECT_EQ(us_local_number, test_number);
3049
+ // This is invalid because no "+" sign is present as part of phone-context.
3050
+ // The phone context is simply ignored in this case just as if it contains a
3051
+ // domain.
3052
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3053
+ phone_util_.Parse("tel:2530000;isub=12345;phone-context=1-650",
3054
+ RegionCode::US(), &test_number));
3055
+ EXPECT_EQ(us_local_number, test_number);
3056
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3057
+ phone_util_.Parse("tel:2530000;isub=12345;phone-context=1234.com",
3058
+ RegionCode::US(), &test_number));
3059
+ EXPECT_EQ(us_local_number, test_number);
3060
+
3061
+ // Test for http://b/issue?id=2247493
3062
+ nz_number.Clear();
3063
+ nz_number.set_country_code(64);
3064
+ nz_number.set_national_number(64123456ULL);
3065
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3066
+ phone_util_.Parse("+64(0)64123456",
3067
+ RegionCode::US(), &test_number));
3068
+ EXPECT_EQ(nz_number, test_number);
3069
+
3070
+ // Check that using a "/" is fine in a phone number.
3071
+ PhoneNumber de_number;
3072
+ de_number.set_country_code(49);
3073
+ de_number.set_national_number(12345678ULL);
3074
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3075
+ phone_util_.Parse("123/45678", RegionCode::DE(), &test_number));
3076
+ EXPECT_EQ(de_number, test_number);
3077
+
3078
+ PhoneNumber us_number;
3079
+ us_number.set_country_code(1);
3080
+ // Check it doesn't use the '1' as a country code when parsing if the phone
3081
+ // number was already possible.
3082
+ us_number.set_national_number(1234567890ULL);
3083
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3084
+ phone_util_.Parse("123-456-7890", RegionCode::US(), &test_number));
3085
+ EXPECT_EQ(us_number, test_number);
3086
+
3087
+ // Test star numbers. Although this is not strictly valid, we would like to
3088
+ // make sure we can parse the output we produce when formatting the number.
3089
+ PhoneNumber star_number;
3090
+ star_number.set_country_code(81);
3091
+ star_number.set_national_number(2345ULL);
3092
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3093
+ phone_util_.Parse("+81 *2345", RegionCode::JP(), &test_number));
3094
+ EXPECT_EQ(star_number, test_number);
3095
+
3096
+ PhoneNumber short_number;
3097
+ short_number.set_country_code(64);
3098
+ short_number.set_national_number(12ULL);
3099
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3100
+ phone_util_.Parse("12", RegionCode::NZ(), &test_number));
3101
+ EXPECT_EQ(short_number, test_number);
3102
+ }
3103
+
3104
+ TEST_F(PhoneNumberUtilTest, ParseNumberWithAlphaCharacters) {
3105
+ // Test case with alpha characters.
3106
+ PhoneNumber test_number;
3107
+ PhoneNumber tollfree_number;
3108
+ tollfree_number.set_country_code(64);
3109
+ tollfree_number.set_national_number(800332005ULL);
3110
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3111
+ phone_util_.Parse("0800 DDA 005", RegionCode::NZ(), &test_number));
3112
+ EXPECT_EQ(tollfree_number, test_number);
3113
+
3114
+ PhoneNumber premium_number;
3115
+ premium_number.set_country_code(64);
3116
+ premium_number.set_national_number(9003326005ULL);
3117
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3118
+ phone_util_.Parse("0900 DDA 6005", RegionCode::NZ(), &test_number));
3119
+ EXPECT_EQ(premium_number, test_number);
3120
+
3121
+ // Not enough alpha characters for them to be considered intentional, so they
3122
+ // are stripped.
3123
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3124
+ phone_util_.Parse("0900 332 6005a",
3125
+ RegionCode::NZ(), &test_number));
3126
+ EXPECT_EQ(premium_number, test_number);
3127
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3128
+ phone_util_.Parse("0900 332 600a5",
3129
+ RegionCode::NZ(), &test_number));
3130
+ EXPECT_EQ(premium_number, test_number);
3131
+
3132
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3133
+ phone_util_.Parse("0900 332 600A5",
3134
+ RegionCode::NZ(), &test_number));
3135
+ EXPECT_EQ(premium_number, test_number);
3136
+
3137
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3138
+ phone_util_.Parse("0900 a332 600A5",
3139
+ RegionCode::NZ(), &test_number));
3140
+ EXPECT_EQ(premium_number, test_number);
3141
+ }
3142
+
3143
+ TEST_F(PhoneNumberUtilTest, ParseWithInternationalPrefixes) {
3144
+ PhoneNumber us_number;
3145
+ us_number.set_country_code(1);
3146
+ us_number.set_national_number(6503336000ULL);
3147
+ PhoneNumber test_number;
3148
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3149
+ phone_util_.Parse("+1 (650) 333-6000",
3150
+ RegionCode::US(), &test_number));
3151
+ EXPECT_EQ(us_number, test_number);
3152
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3153
+ phone_util_.Parse("+1-650-333-6000",
3154
+ RegionCode::US(), &test_number));
3155
+ EXPECT_EQ(us_number, test_number);
3156
+
3157
+ // Calling the US number from Singapore by using different service providers
3158
+ // 1st test: calling using SingTel IDD service (IDD is 001)
3159
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3160
+ phone_util_.Parse("0011-650-333-6000",
3161
+ RegionCode::SG(), &test_number));
3162
+ EXPECT_EQ(us_number, test_number);
3163
+ // 2nd test: calling using StarHub IDD service (IDD is 008)
3164
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3165
+ phone_util_.Parse("0081-650-333-6000",
3166
+ RegionCode::SG(), &test_number));
3167
+ EXPECT_EQ(us_number, test_number);
3168
+ // 3rd test: calling using SingTel V019 service (IDD is 019)
3169
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3170
+ phone_util_.Parse("0191-650-333-6000",
3171
+ RegionCode::SG(), &test_number));
3172
+ EXPECT_EQ(us_number, test_number);
3173
+ // Calling the US number from Poland
3174
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3175
+ phone_util_.Parse("0~01-650-333-6000",
3176
+ RegionCode::PL(), &test_number));
3177
+ EXPECT_EQ(us_number, test_number);
3178
+
3179
+ // Using "++" at the start.
3180
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3181
+ phone_util_.Parse("++1 (650) 333-6000",
3182
+ RegionCode::PL(), &test_number));
3183
+ EXPECT_EQ(us_number, test_number);
3184
+ // Using a full-width plus sign.
3185
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3186
+ phone_util_.Parse("\xEF\xBC\x8B" "1 (650) 333-6000",
3187
+ /* "+1 (650) 333-6000" */
3188
+ RegionCode::SG(), &test_number));
3189
+ // Using a soft hyphen U+00AD.
3190
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3191
+ phone_util_.Parse("1 (650) 333" "\xC2\xAD" "-6000",
3192
+ /* "1 (650) 333­-6000­" */
3193
+ RegionCode::US(), &test_number));
3194
+ EXPECT_EQ(us_number, test_number);
3195
+ // The whole number, including punctuation, is here represented in full-width
3196
+ // form.
3197
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3198
+ phone_util_.Parse("\xEF\xBC\x8B\xEF\xBC\x91\xE3\x80\x80\xEF\xBC\x88"
3199
+ "\xEF\xBC\x96\xEF\xBC\x95\xEF\xBC\x90\xEF\xBC\x89"
3200
+ "\xE3\x80\x80\xEF\xBC\x93\xEF\xBC\x93\xEF\xBC\x93"
3201
+ "\xEF\xBC\x8D\xEF\xBC\x96\xEF\xBC\x90\xEF\xBC\x90"
3202
+ "\xEF\xBC\x90",
3203
+ /* "+1 (650) 333-6000" */
3204
+ RegionCode::SG(), &test_number));
3205
+ EXPECT_EQ(us_number, test_number);
3206
+
3207
+ // Using the U+30FC dash.
3208
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3209
+ phone_util_.Parse("\xEF\xBC\x8B\xEF\xBC\x91\xE3\x80\x80\xEF\xBC\x88"
3210
+ "\xEF\xBC\x96\xEF\xBC\x95\xEF\xBC\x90\xEF\xBC\x89"
3211
+ "\xE3\x80\x80\xEF\xBC\x93\xEF\xBC\x93\xEF\xBC\x93"
3212
+ "\xE3\x83\xBC\xEF\xBC\x96\xEF\xBC\x90\xEF\xBC\x90"
3213
+ "\xEF\xBC\x90",
3214
+ /* "+1 (650) 333ー6000" */
3215
+ RegionCode::SG(), &test_number));
3216
+ EXPECT_EQ(us_number, test_number);
3217
+
3218
+ PhoneNumber toll_free_number;
3219
+ toll_free_number.set_country_code(800);
3220
+ toll_free_number.set_national_number(12345678ULL);
3221
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3222
+ phone_util_.Parse("011 800 1234 5678",
3223
+ RegionCode::US(), &test_number));
3224
+ EXPECT_EQ(toll_free_number, test_number);
3225
+ }
3226
+
3227
+ TEST_F(PhoneNumberUtilTest, ParseWithLeadingZero) {
3228
+ PhoneNumber it_number;
3229
+ it_number.set_country_code(39);
3230
+ it_number.set_national_number(236618300ULL);
3231
+ it_number.set_italian_leading_zero(true);
3232
+ PhoneNumber test_number;
3233
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3234
+ phone_util_.Parse("+39 02-36618 300",
3235
+ RegionCode::NZ(), &test_number));
3236
+ EXPECT_EQ(it_number, test_number);
3237
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3238
+ phone_util_.Parse("02-36618 300", RegionCode::IT(), &test_number));
3239
+ EXPECT_EQ(it_number, test_number);
3240
+
3241
+ it_number.Clear();
3242
+ it_number.set_country_code(39);
3243
+ it_number.set_national_number(312345678ULL);
3244
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3245
+ phone_util_.Parse("312 345 678", RegionCode::IT(), &test_number));
3246
+ EXPECT_EQ(it_number, test_number);
3247
+ }
3248
+
3249
+ TEST_F(PhoneNumberUtilTest, ParseNationalNumberArgentina) {
3250
+ // Test parsing mobile numbers of Argentina.
3251
+ PhoneNumber ar_number;
3252
+ ar_number.set_country_code(54);
3253
+ ar_number.set_national_number(93435551212ULL);
3254
+ PhoneNumber test_number;
3255
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3256
+ phone_util_.Parse("+54 9 343 555 1212", RegionCode::AR(),
3257
+ &test_number));
3258
+ EXPECT_EQ(ar_number, test_number);
3259
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3260
+ phone_util_.Parse("0343 15 555 1212", RegionCode::AR(),
3261
+ &test_number));
3262
+ EXPECT_EQ(ar_number, test_number);
3263
+
3264
+ ar_number.set_national_number(93715654320ULL);
3265
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3266
+ phone_util_.Parse("+54 9 3715 65 4320", RegionCode::AR(),
3267
+ &test_number));
3268
+ EXPECT_EQ(ar_number, test_number);
3269
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3270
+ phone_util_.Parse("03715 15 65 4320", RegionCode::AR(),
3271
+ &test_number));
3272
+ EXPECT_EQ(ar_number, test_number);
3273
+
3274
+ // Test parsing fixed-line numbers of Argentina.
3275
+ ar_number.set_national_number(1137970000ULL);
3276
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3277
+ phone_util_.Parse("+54 11 3797 0000", RegionCode::AR(),
3278
+ &test_number));
3279
+ EXPECT_EQ(ar_number, test_number);
3280
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3281
+ phone_util_.Parse("011 3797 0000", RegionCode::AR(), &test_number));
3282
+ EXPECT_EQ(ar_number, test_number);
3283
+
3284
+ ar_number.set_national_number(3715654321ULL);
3285
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3286
+ phone_util_.Parse("+54 3715 65 4321", RegionCode::AR(),
3287
+ &test_number));
3288
+ EXPECT_EQ(ar_number, test_number);
3289
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3290
+ phone_util_.Parse("03715 65 4321", RegionCode::AR(), &test_number));
3291
+ EXPECT_EQ(ar_number, test_number);
3292
+
3293
+ ar_number.set_national_number(2312340000ULL);
3294
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3295
+ phone_util_.Parse("+54 23 1234 0000", RegionCode::AR(),
3296
+ &test_number));
3297
+ EXPECT_EQ(ar_number, test_number);
3298
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3299
+ phone_util_.Parse("023 1234 0000", RegionCode::AR(), &test_number));
3300
+ EXPECT_EQ(ar_number, test_number);
3301
+ }
3302
+
3303
+ TEST_F(PhoneNumberUtilTest, ParseWithXInNumber) {
3304
+ // Test that having an 'x' in the phone number at the start is ok and that it
3305
+ // just gets removed.
3306
+ PhoneNumber ar_number;
3307
+ ar_number.set_country_code(54);
3308
+ ar_number.set_national_number(123456789ULL);
3309
+ PhoneNumber test_number;
3310
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3311
+ phone_util_.Parse("0123456789", RegionCode::AR(), &test_number));
3312
+ EXPECT_EQ(ar_number, test_number);
3313
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3314
+ phone_util_.Parse("(0) 123456789", RegionCode::AR(), &test_number));
3315
+ EXPECT_EQ(ar_number, test_number);
3316
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3317
+ phone_util_.Parse("0 123456789", RegionCode::AR(), &test_number));
3318
+ EXPECT_EQ(ar_number, test_number);
3319
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3320
+ phone_util_.Parse("(0xx) 123456789", RegionCode::AR(),
3321
+ &test_number));
3322
+ EXPECT_EQ(ar_number, test_number);
3323
+
3324
+ PhoneNumber ar_from_us;
3325
+ ar_from_us.set_country_code(54);
3326
+ ar_from_us.set_national_number(81429712ULL);
3327
+ // This test is intentionally constructed such that the number of digit after
3328
+ // xx is larger than 7, so that the number won't be mistakenly treated as an
3329
+ // extension, as we allow extensions up to 7 digits. This assumption is okay
3330
+ // for now as all the countries where a carrier selection code is written in
3331
+ // the form of xx have a national significant number of length larger than 7.
3332
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3333
+ phone_util_.Parse("011xx5481429712", RegionCode::US(),
3334
+ &test_number));
3335
+ EXPECT_EQ(ar_from_us, test_number);
3336
+ }
3337
+
3338
+ TEST_F(PhoneNumberUtilTest, ParseNumbersMexico) {
3339
+ // Test parsing fixed-line numbers of Mexico.
3340
+ PhoneNumber mx_number;
3341
+
3342
+ mx_number.set_country_code(52);
3343
+ mx_number.set_national_number(4499780001ULL);
3344
+ PhoneNumber test_number;
3345
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3346
+ phone_util_.Parse("+52 (449)978-0001", RegionCode::MX(),
3347
+ &test_number));
3348
+ EXPECT_EQ(mx_number, test_number);
3349
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3350
+ phone_util_.Parse("01 (449)978-0001", RegionCode::MX(),
3351
+ &test_number));
3352
+ EXPECT_EQ(mx_number, test_number);
3353
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3354
+ phone_util_.Parse("(449)978-0001", RegionCode::MX(),
3355
+ &test_number));
3356
+ EXPECT_EQ(mx_number, test_number);
3357
+
3358
+ // Test parsing mobile numbers of Mexico.
3359
+ mx_number.Clear();
3360
+ mx_number.set_country_code(52);
3361
+ mx_number.set_national_number(13312345678ULL);
3362
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3363
+ phone_util_.Parse("+52 1 33 1234-5678", RegionCode::MX(),
3364
+ &test_number));
3365
+ EXPECT_EQ(mx_number, test_number);
3366
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3367
+ phone_util_.Parse("044 (33) 1234-5678", RegionCode::MX(),
3368
+ &test_number));
3369
+ EXPECT_EQ(mx_number, test_number);
3370
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3371
+ phone_util_.Parse("045 33 1234-5678", RegionCode::MX(),
3372
+ &test_number));
3373
+ EXPECT_EQ(mx_number, test_number);
3374
+ }
3375
+
3376
+ TEST_F(PhoneNumberUtilTest, FailedParseOnInvalidNumbers) {
3377
+ PhoneNumber test_number;
3378
+ EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
3379
+ phone_util_.Parse("This is not a phone number", RegionCode::NZ(),
3380
+ &test_number));
3381
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3382
+
3383
+ EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
3384
+ phone_util_.Parse("1 Still not a number", RegionCode::NZ(),
3385
+ &test_number));
3386
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3387
+
3388
+ EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
3389
+ phone_util_.Parse("1 MICROSOFT", RegionCode::NZ(),
3390
+ &test_number));
3391
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3392
+
3393
+ EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
3394
+ phone_util_.Parse("12 MICROSOFT", RegionCode::NZ(),
3395
+ &test_number));
3396
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3397
+
3398
+ EXPECT_EQ(PhoneNumberUtil::TOO_LONG_NSN,
3399
+ phone_util_.Parse("01495 72553301873 810104", RegionCode::GB(),
3400
+ &test_number));
3401
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3402
+
3403
+ EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
3404
+ phone_util_.Parse("+---", RegionCode::DE(),
3405
+ &test_number));
3406
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3407
+
3408
+ EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
3409
+ phone_util_.Parse("+***", RegionCode::DE(),
3410
+ &test_number));
3411
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3412
+
3413
+ EXPECT_EQ(PhoneNumberUtil::NOT_A_NUMBER,
3414
+ phone_util_.Parse("+*******91", RegionCode::DE(),
3415
+ &test_number));
3416
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3417
+
3418
+ EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_NSN,
3419
+ phone_util_.Parse("+49 0", RegionCode::DE(),
3420
+ &test_number));
3421
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3422
+
3423
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
3424
+ phone_util_.Parse("+210 3456 56789", RegionCode::NZ(),
3425
+ &test_number));
3426
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3427
+
3428
+ // 00 is a correct IDD, but 210 is not a valid country code.
3429
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
3430
+ phone_util_.Parse("+ 00 210 3 331 6005", RegionCode::NZ(),
3431
+ &test_number));
3432
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3433
+
3434
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
3435
+ phone_util_.Parse("123 456 7890", RegionCode::GetUnknown(),
3436
+ &test_number));
3437
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3438
+
3439
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
3440
+ phone_util_.Parse("123 456 7890", RegionCode::CS(),
3441
+ &test_number));
3442
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3443
+
3444
+ EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_AFTER_IDD,
3445
+ phone_util_.Parse("0044-----", RegionCode::GB(),
3446
+ &test_number));
3447
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3448
+ EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_AFTER_IDD,
3449
+ phone_util_.Parse("0044", RegionCode::GB(),
3450
+ &test_number));
3451
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3452
+
3453
+ EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_AFTER_IDD,
3454
+ phone_util_.Parse("011", RegionCode::US(),
3455
+ &test_number));
3456
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3457
+ EXPECT_EQ(PhoneNumberUtil::TOO_SHORT_AFTER_IDD,
3458
+ phone_util_.Parse("0119", RegionCode::US(),
3459
+ &test_number));
3460
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3461
+
3462
+ // RFC3966 phone-context is a website.
3463
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
3464
+ phone_util_.Parse("tel:555-1234;phone-context=www.google.com",
3465
+ RegionCode::ZZ(), &test_number));
3466
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3467
+ // This is invalid because no "+" sign is present as part of phone-context.
3468
+ // This should not succeed in being parsed.
3469
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
3470
+ phone_util_.Parse("tel:555-1234;phone-context=1-331",
3471
+ RegionCode::ZZ(), &test_number));
3472
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3473
+ }
3474
+
3475
+ TEST_F(PhoneNumberUtilTest, ParseNumbersWithPlusWithNoRegion) {
3476
+ PhoneNumber nz_number;
3477
+ nz_number.set_country_code(64);
3478
+ nz_number.set_national_number(33316005ULL);
3479
+ // RegionCode::GetUnknown() is allowed only if the number starts with a '+' -
3480
+ // then the country code can be calculated.
3481
+ PhoneNumber result_proto;
3482
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3483
+ phone_util_.Parse("+64 3 331 6005", RegionCode::GetUnknown(),
3484
+ &result_proto));
3485
+ EXPECT_EQ(nz_number, result_proto);
3486
+
3487
+ // Test with full-width plus.
3488
+ result_proto.Clear();
3489
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3490
+ phone_util_.Parse("\xEF\xBC\x8B" "64 3 331 6005",
3491
+ /* "+64 3 331 6005" */
3492
+ RegionCode::GetUnknown(), &result_proto));
3493
+ EXPECT_EQ(nz_number, result_proto);
3494
+ // Test with normal plus but leading characters that need to be stripped.
3495
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3496
+ phone_util_.Parse(" +64 3 331 6005", RegionCode::GetUnknown(),
3497
+ &result_proto));
3498
+ EXPECT_EQ(nz_number, result_proto);
3499
+
3500
+ PhoneNumber toll_free_number;
3501
+ toll_free_number.set_country_code(800);
3502
+ toll_free_number.set_national_number(12345678ULL);
3503
+ result_proto.Clear();
3504
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3505
+ phone_util_.Parse("+800 1234 5678",
3506
+ RegionCode::GetUnknown(), &result_proto));
3507
+ EXPECT_EQ(toll_free_number, result_proto);
3508
+
3509
+ PhoneNumber universal_premium_rate;
3510
+ universal_premium_rate.set_country_code(979);
3511
+ universal_premium_rate.set_national_number(123456789ULL);
3512
+ result_proto.Clear();
3513
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3514
+ phone_util_.Parse("+979 123 456 789",
3515
+ RegionCode::GetUnknown(), &result_proto));
3516
+ EXPECT_EQ(universal_premium_rate, result_proto);
3517
+
3518
+ result_proto.Clear();
3519
+ // Test parsing RFC3966 format with a phone context.
3520
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3521
+ phone_util_.Parse("tel:03-331-6005;phone-context=+64",
3522
+ RegionCode::GetUnknown(), &result_proto));
3523
+ EXPECT_EQ(nz_number, result_proto);
3524
+ result_proto.Clear();
3525
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3526
+ phone_util_.Parse(" tel:03-331-6005;phone-context=+64",
3527
+ RegionCode::GetUnknown(), &result_proto));
3528
+ EXPECT_EQ(nz_number, result_proto);
3529
+ result_proto.Clear();
3530
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3531
+ phone_util_.Parse("tel:03-331-6005;isub=12345;phone-context=+64",
3532
+ RegionCode::GetUnknown(), &result_proto));
3533
+ EXPECT_EQ(nz_number, result_proto);
3534
+
3535
+ nz_number.set_raw_input("+64 3 331 6005");
3536
+ nz_number.set_country_code_source(PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN);
3537
+ // It is important that we set this to an empty string, since we used
3538
+ // ParseAndKeepRawInput and no carrrier code was found.
3539
+ nz_number.set_preferred_domestic_carrier_code("");
3540
+ result_proto.Clear();
3541
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3542
+ phone_util_.ParseAndKeepRawInput("+64 3 331 6005",
3543
+ RegionCode::GetUnknown(),
3544
+ &result_proto));
3545
+ EXPECT_EQ(nz_number, result_proto);
3546
+ }
3547
+
3548
+ TEST_F(PhoneNumberUtilTest, ParseNumberTooShortIfNationalPrefixStripped) {
3549
+ PhoneNumber test_number;
3550
+
3551
+ // Test that a number whose first digits happen to coincide with the national
3552
+ // prefix does not get them stripped if doing so would result in a number too
3553
+ // short to be a possible (regular length) phone number for that region.
3554
+ PhoneNumber by_number;
3555
+ by_number.set_country_code(375);
3556
+ by_number.set_national_number(8123L);
3557
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3558
+ phone_util_.Parse("8123", RegionCode::BY(),
3559
+ &test_number));
3560
+ EXPECT_EQ(by_number, test_number);
3561
+ by_number.set_national_number(81234L);
3562
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3563
+ phone_util_.Parse("81234", RegionCode::BY(),
3564
+ &test_number));
3565
+ EXPECT_EQ(by_number, test_number);
3566
+
3567
+ // The prefix doesn't get stripped, since the input is a viable 6-digit
3568
+ // number, whereas the result of stripping is only 5 digits.
3569
+ by_number.set_national_number(812345L);
3570
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3571
+ phone_util_.Parse("812345", RegionCode::BY(),
3572
+ &test_number));
3573
+ EXPECT_EQ(by_number, test_number);
3574
+
3575
+ // The prefix gets stripped, since only 6-digit numbers are possible.
3576
+ by_number.set_national_number(123456L);
3577
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3578
+ phone_util_.Parse("8123456", RegionCode::BY(),
3579
+ &test_number));
3580
+ EXPECT_EQ(by_number, test_number);
3581
+ }
3582
+
3583
+ TEST_F(PhoneNumberUtilTest, ParseExtensions) {
3584
+ PhoneNumber nz_number;
3585
+ nz_number.set_country_code(64);
3586
+ nz_number.set_national_number(33316005ULL);
3587
+ nz_number.set_extension("3456");
3588
+ PhoneNumber test_number;
3589
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3590
+ phone_util_.Parse("03 331 6005 ext 3456", RegionCode::NZ(),
3591
+ &test_number));
3592
+ EXPECT_EQ(nz_number, test_number);
3593
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3594
+ phone_util_.Parse("03 331 6005x3456", RegionCode::NZ(),
3595
+ &test_number));
3596
+ EXPECT_EQ(nz_number, test_number);
3597
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3598
+ phone_util_.Parse("03-331 6005 int.3456", RegionCode::NZ(),
3599
+ &test_number));
3600
+ EXPECT_EQ(nz_number, test_number);
3601
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3602
+ phone_util_.Parse("03 331 6005 #3456", RegionCode::NZ(),
3603
+ &test_number));
3604
+ EXPECT_EQ(nz_number, test_number);
3605
+
3606
+ // Test the following do not extract extensions:
3607
+ PhoneNumber non_extn_number;
3608
+ non_extn_number.set_country_code(1);
3609
+ non_extn_number.set_national_number(80074935247ULL);
3610
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3611
+ phone_util_.Parse("1800 six-flags", RegionCode::US(),
3612
+ &test_number));
3613
+ EXPECT_EQ(non_extn_number, test_number);
3614
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3615
+ phone_util_.Parse("1800 SIX-FLAGS", RegionCode::US(),
3616
+ &test_number));
3617
+ EXPECT_EQ(non_extn_number, test_number);
3618
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3619
+ phone_util_.Parse("0~0 1800 7493 5247", RegionCode::PL(),
3620
+ &test_number));
3621
+ EXPECT_EQ(non_extn_number, test_number);
3622
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3623
+ phone_util_.Parse("(1800) 7493.5247", RegionCode::US(),
3624
+ &test_number));
3625
+ EXPECT_EQ(non_extn_number, test_number);
3626
+
3627
+ // Check that the last instance of an extension token is matched.
3628
+ PhoneNumber extn_number;
3629
+ extn_number.set_country_code(1);
3630
+ extn_number.set_national_number(80074935247ULL);
3631
+ extn_number.set_extension("1234");
3632
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3633
+ phone_util_.Parse("0~0 1800 7493 5247 ~1234", RegionCode::PL(),
3634
+ &test_number));
3635
+ EXPECT_EQ(extn_number, test_number);
3636
+
3637
+ // Verifying bug-fix where the last digit of a number was previously omitted
3638
+ // if it was a 0 when extracting the extension. Also verifying a few different
3639
+ // cases of extensions.
3640
+ PhoneNumber uk_number;
3641
+ uk_number.set_country_code(44);
3642
+ uk_number.set_national_number(2034567890ULL);
3643
+ uk_number.set_extension("456");
3644
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3645
+ phone_util_.Parse("+44 2034567890x456", RegionCode::NZ(),
3646
+ &test_number));
3647
+ EXPECT_EQ(uk_number, test_number);
3648
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3649
+ phone_util_.Parse("+44 2034567890x456", RegionCode::GB(),
3650
+ &test_number));
3651
+ EXPECT_EQ(uk_number, test_number);
3652
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3653
+ phone_util_.Parse("+44 2034567890 x456", RegionCode::GB(),
3654
+ &test_number));
3655
+ EXPECT_EQ(uk_number, test_number);
3656
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3657
+ phone_util_.Parse("+44 2034567890 X456", RegionCode::GB(),
3658
+ &test_number));
3659
+ EXPECT_EQ(uk_number, test_number);
3660
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3661
+ phone_util_.Parse("+44 2034567890 X 456", RegionCode::GB(),
3662
+ &test_number));
3663
+ EXPECT_EQ(uk_number, test_number);
3664
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3665
+ phone_util_.Parse("+44 2034567890 X 456", RegionCode::GB(),
3666
+ &test_number));
3667
+ EXPECT_EQ(uk_number, test_number);
3668
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3669
+ phone_util_.Parse("+44 2034567890 x 456 ", RegionCode::GB(),
3670
+ &test_number));
3671
+ EXPECT_EQ(uk_number, test_number);
3672
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3673
+ phone_util_.Parse("+44 2034567890 X 456", RegionCode::GB(),
3674
+ &test_number));
3675
+ EXPECT_EQ(uk_number, test_number);
3676
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3677
+ phone_util_.Parse("+44-2034567890;ext=456", RegionCode::GB(),
3678
+ &test_number));
3679
+ EXPECT_EQ(uk_number, test_number);
3680
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3681
+ phone_util_.Parse("tel:2034567890;ext=456;phone-context=+44",
3682
+ RegionCode::ZZ(), &test_number));
3683
+ EXPECT_EQ(uk_number, test_number);
3684
+
3685
+ // Full-width extension, "extn" only.
3686
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3687
+ phone_util_.Parse(
3688
+ "+442034567890\xEF\xBD\x85\xEF\xBD\x98\xEF\xBD\x94\xEF\xBD\x8E"
3689
+ "456", RegionCode::GB(), &test_number));
3690
+ EXPECT_EQ(uk_number, test_number);
3691
+ // "xtn" only.
3692
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3693
+ phone_util_.Parse(
3694
+ "+44-2034567890\xEF\xBD\x98\xEF\xBD\x94\xEF\xBD\x8E""456",
3695
+ RegionCode::GB(), &test_number));
3696
+ EXPECT_EQ(uk_number, test_number);
3697
+ // "xt" only.
3698
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3699
+ phone_util_.Parse("+44-2034567890\xEF\xBD\x98\xEF\xBD\x94""456",
3700
+ RegionCode::GB(), &test_number));
3701
+ EXPECT_EQ(uk_number, test_number);
3702
+
3703
+ PhoneNumber us_with_extension;
3704
+ us_with_extension.set_country_code(1);
3705
+ us_with_extension.set_national_number(8009013355ULL);
3706
+ us_with_extension.set_extension("7246433");
3707
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3708
+ phone_util_.Parse("(800) 901-3355 x 7246433", RegionCode::US(),
3709
+ &test_number));
3710
+ EXPECT_EQ(us_with_extension, test_number);
3711
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3712
+ phone_util_.Parse("(800) 901-3355 , ext 7246433", RegionCode::US(),
3713
+ &test_number));
3714
+ EXPECT_EQ(us_with_extension, test_number);
3715
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3716
+ phone_util_.Parse("(800) 901-3355 ,extension 7246433",
3717
+ RegionCode::US(),
3718
+ &test_number));
3719
+ EXPECT_EQ(us_with_extension, test_number);
3720
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3721
+ phone_util_.Parse("(800) 901-3355 ,extensi\xC3\xB3n 7246433",
3722
+ /* "(800) 901-3355 ,extensión 7246433" */
3723
+ RegionCode::US(),
3724
+ &test_number));
3725
+ EXPECT_EQ(us_with_extension, test_number);
3726
+ // Repeat with the small letter o with acute accent created by combining
3727
+ // characters.
3728
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3729
+ phone_util_.Parse("(800) 901-3355 ,extensio\xCC\x81n 7246433",
3730
+ /* "(800) 901-3355 ,extensión 7246433" */
3731
+ RegionCode::US(),
3732
+ &test_number));
3733
+ EXPECT_EQ(us_with_extension, test_number);
3734
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3735
+ phone_util_.Parse("(800) 901-3355 , 7246433", RegionCode::US(),
3736
+ &test_number));
3737
+ EXPECT_EQ(us_with_extension, test_number);
3738
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3739
+ phone_util_.Parse("(800) 901-3355 ext: 7246433", RegionCode::US(),
3740
+ &test_number));
3741
+ EXPECT_EQ(us_with_extension, test_number);
3742
+
3743
+ // Test that if a number has two extensions specified, we ignore the second.
3744
+ PhoneNumber us_with_two_extensions_number;
3745
+ us_with_two_extensions_number.set_country_code(1);
3746
+ us_with_two_extensions_number.set_national_number(2121231234ULL);
3747
+ us_with_two_extensions_number.set_extension("508");
3748
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3749
+ phone_util_.Parse("(212)123-1234 x508/x1234", RegionCode::US(),
3750
+ &test_number));
3751
+ EXPECT_EQ(us_with_two_extensions_number, test_number);
3752
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3753
+ phone_util_.Parse("(212)123-1234 x508/ x1234", RegionCode::US(),
3754
+ &test_number));
3755
+ EXPECT_EQ(us_with_two_extensions_number, test_number);
3756
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3757
+ phone_util_.Parse("(212)123-1234 x508\\x1234", RegionCode::US(),
3758
+ &test_number));
3759
+ EXPECT_EQ(us_with_two_extensions_number, test_number);
3760
+
3761
+ // Test parsing numbers in the form (645) 123-1234-910# works, where the last
3762
+ // 3 digits before the # are an extension.
3763
+ us_with_extension.Clear();
3764
+ us_with_extension.set_country_code(1);
3765
+ us_with_extension.set_national_number(6451231234ULL);
3766
+ us_with_extension.set_extension("910");
3767
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3768
+ phone_util_.Parse("+1 (645) 123 1234-910#", RegionCode::US(),
3769
+ &test_number));
3770
+ EXPECT_EQ(us_with_extension, test_number);
3771
+ }
3772
+
3773
+ TEST_F(PhoneNumberUtilTest, ParseAndKeepRaw) {
3774
+ PhoneNumber alpha_numeric_number;
3775
+ alpha_numeric_number.set_country_code(1);
3776
+ alpha_numeric_number.set_national_number(80074935247ULL);
3777
+ alpha_numeric_number.set_raw_input("800 six-flags");
3778
+ alpha_numeric_number.set_country_code_source(
3779
+ PhoneNumber::FROM_DEFAULT_COUNTRY);
3780
+ alpha_numeric_number.set_preferred_domestic_carrier_code("");
3781
+
3782
+ PhoneNumber test_number;
3783
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3784
+ phone_util_.ParseAndKeepRawInput("800 six-flags", RegionCode::US(),
3785
+ &test_number));
3786
+ EXPECT_EQ(alpha_numeric_number, test_number);
3787
+
3788
+ alpha_numeric_number.set_national_number(8007493524ULL);
3789
+ alpha_numeric_number.set_raw_input("1800 six-flag");
3790
+ alpha_numeric_number.set_country_code_source(
3791
+ PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN);
3792
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3793
+ phone_util_.ParseAndKeepRawInput("1800 six-flag", RegionCode::US(),
3794
+ &test_number));
3795
+ EXPECT_EQ(alpha_numeric_number, test_number);
3796
+
3797
+ alpha_numeric_number.set_raw_input("+1800 six-flag");
3798
+ alpha_numeric_number.set_country_code_source(
3799
+ PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN);
3800
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3801
+ phone_util_.ParseAndKeepRawInput("+1800 six-flag", RegionCode::CN(),
3802
+ &test_number));
3803
+ EXPECT_EQ(alpha_numeric_number, test_number);
3804
+
3805
+ alpha_numeric_number.set_raw_input("001800 six-flag");
3806
+ alpha_numeric_number.set_country_code_source(
3807
+ PhoneNumber::FROM_NUMBER_WITH_IDD);
3808
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3809
+ phone_util_.ParseAndKeepRawInput("001800 six-flag",
3810
+ RegionCode::NZ(),
3811
+ &test_number));
3812
+ EXPECT_EQ(alpha_numeric_number, test_number);
3813
+
3814
+ // Try with invalid region - expect failure. We clear the test number first
3815
+ // because if parsing isn't successful, the number parsed in won't be changed.
3816
+ test_number.Clear();
3817
+ EXPECT_EQ(PhoneNumberUtil::INVALID_COUNTRY_CODE_ERROR,
3818
+ phone_util_.Parse("123 456 7890", RegionCode::CS(), &test_number));
3819
+ EXPECT_EQ(PhoneNumber::default_instance(), test_number);
3820
+
3821
+ PhoneNumber korean_number;
3822
+ korean_number.set_country_code(82);
3823
+ korean_number.set_national_number(22123456);
3824
+ korean_number.set_raw_input("08122123456");
3825
+ korean_number.set_country_code_source(PhoneNumber::FROM_DEFAULT_COUNTRY);
3826
+ korean_number.set_preferred_domestic_carrier_code("81");
3827
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3828
+ phone_util_.ParseAndKeepRawInput("08122123456",
3829
+ RegionCode::KR(),
3830
+ &test_number));
3831
+ EXPECT_EQ(korean_number, test_number);
3832
+ }
3833
+
3834
+ TEST_F(PhoneNumberUtilTest, ParseItalianLeadingZeros) {
3835
+ PhoneNumber zeros_number;
3836
+ zeros_number.set_country_code(61);
3837
+ PhoneNumber test_number;
3838
+
3839
+ // Test the number "011".
3840
+ zeros_number.set_national_number(11L);
3841
+ zeros_number.set_italian_leading_zero(true);
3842
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3843
+ phone_util_.Parse("011", RegionCode::AU(),
3844
+ &test_number));
3845
+ EXPECT_EQ(zeros_number, test_number);
3846
+
3847
+ // Test the number "001".
3848
+ zeros_number.set_national_number(1L);
3849
+ zeros_number.set_italian_leading_zero(true);
3850
+ zeros_number.set_number_of_leading_zeros(2);
3851
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3852
+ phone_util_.Parse("001", RegionCode::AU(),
3853
+ &test_number));
3854
+ EXPECT_EQ(zeros_number, test_number);
3855
+
3856
+ // Test the number "000". This number has 2 leading zeros.
3857
+ zeros_number.set_national_number(0L);
3858
+ zeros_number.set_italian_leading_zero(true);
3859
+ zeros_number.set_number_of_leading_zeros(2);
3860
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3861
+ phone_util_.Parse("000", RegionCode::AU(),
3862
+ &test_number));
3863
+ EXPECT_EQ(zeros_number, test_number);
3864
+
3865
+ // Test the number "0000". This number has 3 leading zeros.
3866
+ zeros_number.set_national_number(0L);
3867
+ zeros_number.set_italian_leading_zero(true);
3868
+ zeros_number.set_number_of_leading_zeros(3);
3869
+ EXPECT_EQ(PhoneNumberUtil::NO_PARSING_ERROR,
3870
+ phone_util_.Parse("0000", RegionCode::AU(),
3871
+ &test_number));
3872
+ EXPECT_EQ(zeros_number, test_number);
3873
+ }
3874
+
3875
+ TEST_F(PhoneNumberUtilTest, CanBeInternationallyDialled) {
3876
+ PhoneNumber test_number;
3877
+ test_number.set_country_code(1);
3878
+
3879
+ // We have no-international-dialling rules for the US in our test metadata
3880
+ // that say that toll-free numbers cannot be dialled internationally.
3881
+ test_number.set_national_number(8002530000ULL);
3882
+ EXPECT_FALSE(CanBeInternationallyDialled(test_number));
3883
+
3884
+ // Normal US numbers can be internationally dialled.
3885
+ test_number.set_national_number(6502530000ULL);
3886
+ EXPECT_TRUE(CanBeInternationallyDialled(test_number));
3887
+
3888
+ // Invalid number.
3889
+ test_number.set_national_number(2530000ULL);
3890
+ EXPECT_TRUE(CanBeInternationallyDialled(test_number));
3891
+
3892
+ // We have no data for NZ - should return true.
3893
+ test_number.set_country_code(64);
3894
+ test_number.set_national_number(33316005ULL);
3895
+ EXPECT_TRUE(CanBeInternationallyDialled(test_number));
3896
+
3897
+ test_number.set_country_code(800);
3898
+ test_number.set_national_number(12345678ULL);
3899
+ EXPECT_TRUE(CanBeInternationallyDialled(test_number));
3900
+ }
3901
+
3902
+ TEST_F(PhoneNumberUtilTest, IsAlphaNumber) {
3903
+ EXPECT_TRUE(phone_util_.IsAlphaNumber("1800 six-flags"));
3904
+ EXPECT_TRUE(phone_util_.IsAlphaNumber("1800 six-flags ext. 1234"));
3905
+ EXPECT_TRUE(phone_util_.IsAlphaNumber("+800 six-flags"));
3906
+ EXPECT_TRUE(phone_util_.IsAlphaNumber("180 six-flags"));
3907
+ EXPECT_FALSE(phone_util_.IsAlphaNumber("1800 123-1234"));
3908
+ EXPECT_FALSE(phone_util_.IsAlphaNumber("1 six-flags"));
3909
+ EXPECT_FALSE(phone_util_.IsAlphaNumber("18 six-flags"));
3910
+ EXPECT_FALSE(phone_util_.IsAlphaNumber("1800 123-1234 extension: 1234"));
3911
+ EXPECT_FALSE(phone_util_.IsAlphaNumber("+800 1234-1234"));
3912
+ }
3913
+
3914
+ } // namespace phonenumbers
3915
+ } // namespace i18n