summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortronikos <tronikos@ee073f10-1060-11df-b6a4-87a95322a99c>2013-04-23 07:36:38 +0000
committertronikos <tronikos@ee073f10-1060-11df-b6a4-87a95322a99c>2013-04-23 07:36:38 +0000
commitc6bd23a9bd24cef8aaff3dfb406d2279ac399338 (patch)
tree45f343506fd6350f1069ab469a4d80c52da18de5
parent409802ae1cf1810ad39672365484de94e89775e6 (diff)
downloadandroid_external_libphonenumbergoogle-c6bd23a9bd24cef8aaff3dfb406d2279ac399338.tar.gz
android_external_libphonenumbergoogle-c6bd23a9bd24cef8aaff3dfb406d2279ac399338.tar.bz2
android_external_libphonenumbergoogle-c6bd23a9bd24cef8aaff3dfb406d2279ac399338.zip
JS: Fix some compiler issues. Add missing ReginoCode.CH in regioncodefortesting.js. Change visibility of isNumberGeographical to public so that it can be accessed from tests.
Review URL: https://codereview.appspot.com/8649050 git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@564 ee073f10-1060-11df-b6a4-87a95322a99c
-rw-r--r--javascript/i18n/phonenumbers/phonenumberutil.js5
-rw-r--r--javascript/i18n/phonenumbers/phonenumberutil_test.js6
-rw-r--r--javascript/i18n/phonenumbers/regioncodefortesting.js1
3 files changed, 6 insertions, 6 deletions
diff --git a/javascript/i18n/phonenumbers/phonenumberutil.js b/javascript/i18n/phonenumbers/phonenumberutil.js
index 1b7d768..a62761f 100644
--- a/javascript/i18n/phonenumbers/phonenumberutil.js
+++ b/javascript/i18n/phonenumbers/phonenumberutil.js
@@ -1138,7 +1138,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.getLengthOfGeographicalAreaCode =
return 0;
}
- if (!this.isNumberGeographical_(number)) {
+ if (!this.isNumberGeographical(number)) {
return 0;
}
@@ -1296,9 +1296,8 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.formattingRuleHasFirstGroupOnly =
*
* @param {i18n.phonenumbers.PhoneNumber} phoneNumber The phone number to test.
* @return {boolean} true if the phone number has a geographical association.
- * @private
*/
-i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberGeographical_ =
+i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberGeographical =
function(phoneNumber) {
/** @type {i18n.phonenumbers.PhoneNumberType} */
var numberType = this.getNumberType(phoneNumber);
diff --git a/javascript/i18n/phonenumbers/phonenumberutil_test.js b/javascript/i18n/phonenumbers/phonenumberutil_test.js
index 1ee08a5..5e29a90 100644
--- a/javascript/i18n/phonenumbers/phonenumberutil_test.js
+++ b/javascript/i18n/phonenumbers/phonenumberutil_test.js
@@ -318,11 +318,11 @@ function testGetInstanceLoadInternationalTollFreeMetadata() {
function testIsNumberGeographical() {
// Bahamas, mobile phone number.
- assertFalse(phoneUtil.isNumberGeographical_(BS_MOBILE));
+ assertFalse(phoneUtil.isNumberGeographical(BS_MOBILE));
// Australian fixed line number.
- assertTrue(phoneUtil.isNumberGeographical_(AU_NUMBER));
+ assertTrue(phoneUtil.isNumberGeographical(AU_NUMBER));
// International toll free number.
- assertFalse(phoneUtil.isNumberGeographical_(INTERNATIONAL_TOLL_FREE));
+ assertFalse(phoneUtil.isNumberGeographical(INTERNATIONAL_TOLL_FREE));
}
function testIsLeadingZeroPossible() {
diff --git a/javascript/i18n/phonenumbers/regioncodefortesting.js b/javascript/i18n/phonenumbers/regioncodefortesting.js
index 3142fad..f179605 100644
--- a/javascript/i18n/phonenumbers/regioncodefortesting.js
+++ b/javascript/i18n/phonenumbers/regioncodefortesting.js
@@ -41,6 +41,7 @@ i18n.phonenumbers.RegionCode = {
BS: 'BS',
BY: 'BY',
CA: 'CA',
+ CH: 'CH',
CN: 'CN',
CS: 'CS',
DE: 'DE',