未验证 提交 2fb00f27 编写于 作者: O openharmony_ci 提交者: Gitee

!7700 新增电话号码降级匹配逻辑 to 1018

Merge pull request !7700 from 杨清/cherry-pick-1677052900
...@@ -761,7 +761,7 @@ describe('I18nTest', function () { ...@@ -761,7 +761,7 @@ describe('I18nTest', function () {
console.log('i18n_test_7810 ' + ran); console.log('i18n_test_7810 ' + ran);
let value = phonenumber.getLocationName('1351057467' + ran, 'zh-CN'); let value = phonenumber.getLocationName('1351057467' + ran, 'zh-CN');
console.log('i18n_test_7810 ' + value); console.log('i18n_test_7810 ' + value);
expect(value).assertEqual('中国'); expect(value == '中国' || value == '广东省深圳市').assertTrue();
}) })
/** /**
...@@ -776,10 +776,10 @@ describe('I18nTest', function () { ...@@ -776,10 +776,10 @@ describe('I18nTest', function () {
console.log('i18n_test_7820 ' + ran); console.log('i18n_test_7820 ' + ran);
let value = phonenumber.getLocationName('+861351057467' + ran, 'en-US'); let value = phonenumber.getLocationName('+861351057467' + ran, 'en-US');
console.log('i18n_test_7820 ' + value); console.log('i18n_test_7820 ' + value);
expect(value).assertEqual('China'); expect(value == 'China' || value == 'Shenzhen, Guangdong').assertTrue();
let value2 = phonenumber.getLocationName('+86 1351057467' + ran, 'en-US'); let value2 = phonenumber.getLocationName('+86 1351057467' + ran, 'en-US');
console.log('i18n_test_7820 ' + value2); console.log('i18n_test_7820 ' + value2);
expect(value2).assertEqual('China'); expect(value2 == 'China' || value2 == 'Shenzhen, Guangdong').assertTrue();
}) })
/** /**
...@@ -794,10 +794,10 @@ describe('I18nTest', function () { ...@@ -794,10 +794,10 @@ describe('I18nTest', function () {
console.log('i18n_test_7830 ' + ran); console.log('i18n_test_7830 ' + ran);
let value1 = phonenumber.getLocationName('+861586661737' + ran, 'en-US'); let value1 = phonenumber.getLocationName('+861586661737' + ran, 'en-US');
console.log('i18n_test_7830 ' + value1); console.log('i18n_test_7830 ' + value1);
expect(value1).assertEqual('China'); expect(value1 == 'China' || value1 == 'Jinan, Shandong').assertTrue();
let value2 = phonenumber.getLocationName('+86 1586661737' + ran, 'en-US'); let value2 = phonenumber.getLocationName('+86 1586661737' + ran, 'en-US');
console.log('i18n_test_7830 ' + value2); console.log('i18n_test_7830 ' + value2);
expect(value2).assertEqual('China'); expect(value2 == 'China' || value2 == 'Jinan, Shandong').assertTrue();
}) })
/** /**
...@@ -812,7 +812,7 @@ describe('I18nTest', function () { ...@@ -812,7 +812,7 @@ describe('I18nTest', function () {
console.log('i18n_test_7840 ' + ran); console.log('i18n_test_7840 ' + ran);
let value = phonenumber.getLocationName('027-5937411' + ran, 'zh-CN'); let value = phonenumber.getLocationName('027-5937411' + ran, 'zh-CN');
console.log('i18n_test_7840 ' + value); console.log('i18n_test_7840 ' + value);
expect(value).assertEqual('中国'); expect(value == '中国' || value == '湖北省武汉市').assertTrue();
}) })
/** /**
...@@ -827,7 +827,7 @@ describe('I18nTest', function () { ...@@ -827,7 +827,7 @@ describe('I18nTest', function () {
console.log('i18n_test_7850 ' + ran); console.log('i18n_test_7850 ' + ran);
let value = phonenumber.getLocationName('0728-623797' + ran, 'zh-CN'); let value = phonenumber.getLocationName('0728-623797' + ran, 'zh-CN');
console.log('i18n_test_7850 ' + value); console.log('i18n_test_7850 ' + value);
expect(value).assertEqual('中国'); expect(value == '中国' || value == '湖北省仙桃市').assertTrue();
}) })
/** /**
......
...@@ -2217,7 +2217,7 @@ describe('PerfTest', function () { ...@@ -2217,7 +2217,7 @@ describe('PerfTest', function () {
+ ' value: ' + value + ' value: ' + value
+ ' exeTime: ' + exeTime + ' exeTime: ' + exeTime
+ ' avgTime: ' + avgTime); + ' avgTime: ' + avgTime);
expect(value).assertEqual('中国'); expect(value == '中国' || value == '广东省深圳市').assertTrue();
if(avgTime < 10){ if(avgTime < 10){
expect(true).assertTrue(); expect(true).assertTrue();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册