From cc0b05ad2c31299c11b1bcfe4545c6f2ce2d44eb Mon Sep 17 00:00:00 2001 From: y00314596 Date: Tue, 23 Nov 2021 16:20:05 +0800 Subject: [PATCH] modify on 20211123 by yangqing3@huawei.com Signed-off-by: y00314596 --- .../intljs/src/main/js/default/test/Intl.test.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/global/i18n_standard/intljs/src/main/js/default/test/Intl.test.js b/global/i18n_standard/intljs/src/main/js/default/test/Intl.test.js index ec1009098..e8f889d5e 100755 --- a/global/i18n_standard/intljs/src/main/js/default/test/Intl.test.js +++ b/global/i18n_standard/intljs/src/main/js/default/test/Intl.test.js @@ -12,6 +12,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import I18n from '@ohos.i18n' import Intl from '@ohos.intl' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' @@ -880,7 +882,10 @@ describe('intlTest', function () { it('formatNumber_test_0800', 0, function () { let numfmt = new Intl.NumberFormat('aa'); console.log('formatNumber_test_0800 ' + numfmt.format(123456.789)); - expect(numfmt.format(123456.789)).assertEqual('123456.789'); + let lang = I18n.getSystemLanguage(); + if (lang === 'zh') { + expect(numfmt.format(123456.789)).assertEqual('123,456.789'); + } }) /* * @@ -935,7 +940,10 @@ describe('intlTest', function () { it('formatNumber_test_1300', 0, function () { let numfmt = new Intl.NumberFormat(['aa','bb']); console.log('formatNumber_test_1300 ' + numfmt.format(123456.789)); - expect(numfmt.format(123456.789)).assertEqual('123456.789'); + let lang = I18n.getSystemLanguage(); + if (lang === 'zh') { + expect(numfmt.format(123456.789)).assertEqual('123,456.789'); + } }) /* * -- GitLab