Intl.test.js 67.2 KB
Newer Older
J
jiyong_sd 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507
/*
 * Copyright (C) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * 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 '@ohos/hypium'

export default function intlTest() {
describe('intlTest', function () {
    console.log('*************start IntlTest*************');

    let hour = I18n.is24HourClock();
    console.log('init 24 hour clock value ' + hour);

    /* *
    * execute this step before all testcases
    */
    beforeAll(function(){
        console.log('step before all cases in intl.'
        + ' 24hour: ' + I18n.is24HourClock()
        + ' prelang: ' + I18n.getPreferredLanguageList()
        + ' syslocale: ' + I18n.getSystemLocale());
    })

    /* *
    * execute this step before every testcase
    */
    beforeEach(function(){
        console.log('step before every case in intl.');
    })

    /* *
    * execute this step after every testcase
    */
    afterEach(function(){
        console.log('step after every case in I18n.');
    })

    /* *
    * execute this step after all testcases
    */
    afterAll(function(){
        console.log('step after all cases in intl.'
        + ' 24hour: ' + I18n.is24HourClock()
        + ' prelang: ' + I18n.getPreferredLanguageList()
        + ' syslocale: ' + I18n.getSystemLocale());
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0100
    * @tc.name    test the language in en-Latn-GB locale
    * @tc.desc    check the language
    */
    it('locale_test_0100', 0, function () {
        let locale = new Intl.Locale('en-Latn-GB');
        console.log('locale_test_0100 ' + locale.language);
        expect(locale.language).assertEqual('en');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0200
    * @tc.name    test the language in ja-Jpan-JP-u-ca-japanese-hc-h12-co-emoji locale
    * @tc.desc    check the language
    */
    it('locale_test_0200', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP-u-ca-japanese-hc-h12-co-emoji');
        console.log('locale_test_0200 ' + locale.language);
        expect(locale.language).assertEqual('ja');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0300
    * @tc.name    test the script in locale
    * @tc.desc    check the script
    */
    it('locale_test_0300', 0, function () {
        let locale = new Intl.Locale('en-Latn-GB');
        console.log('locale_test_0300 ' + locale.script);
        expect(locale.script).assertEqual('Latn');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0400
    * @tc.name    test the region in locale
    * @tc.desc    check the region
    */
    it('locale_test_0400', 0, function () {
        let locale = new Intl.Locale('en-Latn-GB');
        console.log('locale_test_0400 ' + locale.region);
        expect(locale.region).assertEqual('GB');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0500
    * @tc.name    test the basename in locale
    * @tc.desc    check the basename
    */
    it('locale_test_0500', 0, function () {
        let locale = new Intl.Locale('en-Latn-GB');
        console.log('locale_test_0500 ' + locale.baseName);
        expect(locale.baseName).assertEqual('en-Latn-GB');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0600
    * @tc.name    test the basename in ja-Jpan-JP-u-ca-japanese-hc-h12
    * @tc.desc    check the ja-Jpan-JP-u-ca-japanese-hc-h12 basename
    */
    it('locale_test_0600', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP-u-ca-japanese-hc-h12');
        console.log('locale_test_0600 ' + locale.baseName);
        expect(locale.baseName).assertEqual('ja-Jpan-JP');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0700
    * @tc.name    test the hourCycle
    * @tc.desc    check the hourCycle
    */
    it('locale_test_0700', 0, function () {
        let locale = new Intl.Locale('zh-CN', {hourCycle: 'h24', calendar: 'gregory'});
        console.log('locale_test_0700 ' + locale.hourCycle);
        expect(locale.hourCycle).assertEqual('h24');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0800
    * @tc.name    test the calendar
    * @tc.desc    check the calendar
    */
    it('locale_test_0800', 0, function () {
        let locale = new Intl.Locale('zh-CN', {hourCycle: 'h24', calendar: 'gregory'});
        console.log('locale_test_0800 ' + locale.calendar);
        expect(locale.calendar).assertEqual('gregory');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_0900
    * @tc.name    test the japanese calendar
    * @tc.desc    check the japanese calendar
    */
    it('locale_test_0900', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP-u-ca-japanese-hc-h12');
        console.log('locale_test_0900 ' + locale.calendar);
        expect(locale.calendar).assertEqual('japanese');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1000
    * @tc.name    test the h12 hourCycle
    * @tc.desc    check the h12 hourCycle
    */
    it('locale_test_1000', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP-u-ca-japanese-hc-h12');
        console.log('locale_test_1000 ' + locale.hourCycle);
        expect(locale.hourCycle).assertEqual('h12');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1100
    * @tc.name    test the caseFirst with upper
    * @tc.desc    check the caseFirst
    */
    it('locale_test_1100', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP', {caseFirst: 'upper'});
        console.log('locale_test_1100 ' + locale.caseFirst);
        expect(locale.caseFirst).assertEqual('upper');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1120
    * @tc.name    test the caseFirst with lower
    * @tc.desc    check the caseFirst
    */
    it('locale_test_1120', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP', {caseFirst: 'lower'});
        console.log('locale_test_1120 ' + locale.caseFirst);
        expect(locale.caseFirst).assertEqual('lower');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1140
    * @tc.name    test the caseFirst with false
    * @tc.desc    check the caseFirst
    */
    it('locale_test_1140', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP', {caseFirst: 'false'});
        console.log('locale_test_1140 ' + locale.caseFirst);
        expect(locale.caseFirst).assertEqual('false');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1200
    * @tc.name    test the collation
    * @tc.desc    check the collation
    */
    it('locale_test_1200', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP', {collation: 'big5han'});
        console.log('locale_test_1200 ' + locale.collation);
        expect(locale.collation).assertEqual('big5han');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1300
    * @tc.name    test the numeric with true value
    * @tc.desc    check the numeric
    */
    it('locale_test_1300', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP', {numeric: true});
        console.log('locale_test_1300 ' + locale.numeric);
        expect(locale.numeric).assertTrue();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1350
    * @tc.name    test the numeric with false value
    * @tc.desc    check the numeric
    */
    it('locale_test_1350', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP', {numeric: false});
        console.log('locale_test_1350 ' + locale.numeric);
        expect(locale.numeric).assertFalse();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1400
    * @tc.name    test the numberingSystem
    * @tc.desc    check the numberingSystem
    */
    it('locale_test_1400', 0, function () {
        let locale = new Intl.Locale('ja-Jpan-JP', {numberingSystem: 'arab'});
        console.log('locale_test_1400 ' + locale.numberingSystem);
        expect(locale.numberingSystem).assertEqual('arab');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1500
    * @tc.name    test the toString interface with zh
    * @tc.desc    check the toString method with zh
    */
    it('locale_test_1500', 0, function () {
        let locale = new Intl.Locale('zh');
        console.log('locale_test_1500 ' + locale.toString());
        expect(locale.toString()).assertEqual('zh');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1600
    * @tc.name    test the toString interface with zh-CN
    * @tc.desc    check the toString method with zh-CN
    */
    it('locale_test_1600', 0, function () {
        let locale = new Intl.Locale('zh-CN');
        console.log('locale_test_1600 ' + locale.toString());
        expect(locale.toString()).assertEqual('zh-CN');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1700
    * @tc.name    test the toString interface with zh-Hans-CN
    * @tc.desc    check the toString method with zh-Hans-CN
    */
    it('locale_test_1700', 0, function () {
        let locale = new Intl.Locale('zh-Hans-CN');
        console.log('locale_test_1700 ' + locale.toString());
        expect(locale.toString()).assertEqual('zh-Hans-CN');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1800
    * @tc.name    test the toString interface with zh-Hans-CN-u-hc-h12-ca-japanese
    * @tc.desc    check the toString method with zh-Hans-CN-u-hc-h12-ca-japanese
    */
    it('locale_test_1800', 0, function () {
        let locale = new Intl.Locale('zh-Hans-CN-u-ca-japanese-hc-h12');
        console.log('locale_test_1800 ' + locale.toString());
        expect(locale.toString()).assertEqual('zh-Hans-CN-u-hc-h12-ca-japanese');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_1900
    * @tc.name    test the maximize interface with zh-u-ca-gregory-co-compact param
    * @tc.desc    check the maximize method with zh-u-ca-gregory-co-compact param
    */
    it('locale_test_1900', 0, function () {
        let locale = new Intl.Locale('zh', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_1900 ' + locale.toString());
        expect(locale.toString()).assertEqual('zh-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2000
    * @tc.name    test the toString interface with zh-CN-u-ca-gregory-co-compact param
    * @tc.desc    check the toString method with zh-CN-u-ca-gregory-co-compact param
    */
    it('locale_test_2000', 0, function () {
        let locale = new Intl.Locale('zh-CN', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_2000 ' + locale.toString());
        expect(locale.toString()).assertEqual('zh-CN-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2100
    * @tc.name    test the toString interface with zh-hans-CN-u-ca-gregory-co-compact param
    * @tc.desc    check the toString method with zh-hans-CN-u-ca-gregory-co-compact param
    */
    it('locale_test_2100', 0, function () {
        let locale = new Intl.Locale('zh-hans-CN', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_2100 ' + locale.toString());
        expect(locale.toString()).assertEqual('zh-hans-CN-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2200
    * @tc.name    test the minimize interface with one param zh
    * @tc.desc    check the minimize method with one param zh
    */
    it('locale_test_2200', 0, function () {
        let locale = new Intl.Locale('zh');
        console.log('locale_test_2200 ' + locale.minimize().toString());
        expect(locale.minimize().toString()).assertEqual('zh');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2201
    * @tc.name    test the minimize interface with one param zh-CN
    * @tc.desc    check the minimize method with one param zh-CN
    */
    it('locale_test_2201', 0, function () {
        let locale = new Intl.Locale('zh-CN');
        console.log('locale_test_2201 ' + locale.minimize().toString());
        expect(locale.minimize().toString()).assertEqual('zh');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2202
    * @tc.name    test the minimize interface with one param zh-Hans-CN
    * @tc.desc    check the minimize method with one param zh-Hans-CN
    */
    it('locale_test_2202', 0, function () {
        let locale = new Intl.Locale('zh-Hans-CN');
        console.log('locale_test_2202 ' + locale.minimize().toString());
        expect(locale.minimize().toString()).assertEqual('zh');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2203
    * @tc.name    test the minimize interface with one param zh-Hans-CN-u-ca-gregory-co-compact
    * @tc.desc    check the minimize method with one param zh-Hans-CN-u-ca-gregory-co-compact
    */
    it('locale_test_2203', 0, function () {
        let locale = new Intl.Locale('zh-Hans-CN-u-ca-gregory-co-compact');
        console.log('locale_test_2203 ' + locale.minimize().toString());
        expect(locale.minimize().toString()).assertEqual('zh-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2204
    * @tc.name    test the minimize interface with zh lcoale
    * @tc.desc    check the minimize method with zh lcoale
    */
    it('locale_test_2204', 0, function () {
        let locale = new Intl.Locale('zh', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_2204 ' + locale.minimize().toString());
        expect(locale.minimize().toString()).assertEqual('zh-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2205
    * @tc.name    test the minimize interface with zh-CN lcoale
    * @tc.desc    check the minimize method with zh-CN lcoale
    */
    it('locale_test_2205', 0, function () {
        let locale = new Intl.Locale('zh-CN', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_2205 ' + locale.minimize().toString());
        expect(locale.minimize().toString()).assertEqual('zh-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2206
    * @tc.name    test the minimize interface with zh-Hans-CN lcoale
    * @tc.desc    check the minimize method with zh-Hans-CN lcoale
    */
    it('locale_test_2206', 0, function () {
        let locale = new Intl.Locale('zh-hans-CN', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_2206 ' + locale.minimize().toString());
        expect(locale.minimize().toString()).assertEqual('zh-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2300
    * @tc.name    test the maximize interface with one param zh
    * @tc.desc    check the maximize method with one param zh
    */
    it('locale_test_2300', 0, function () {
        let locale = new Intl.Locale('zh');
        console.log('locale_test_2300 ' + locale.maximize().toString());
        expect(locale.maximize().toString()).assertEqual('zh-Hans-CN');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2301
    * @tc.name    test the maximize interface with one param zh-CN
    * @tc.desc    check the maximize method with one param zh-CN
    */
    it('locale_test_2301', 0, function () {
        let locale = new Intl.Locale('zh-CN');
        console.log('locale_test_2301 ' + locale.maximize().toString());
        expect(locale.maximize().toString()).assertEqual('zh-Hans-CN');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2302
    * @tc.name    test the maximize interface with one param zh-Hans-CN-u-ca-gregory-co-compact
    * @tc.desc    check the maximize method with one param zh-Hans-CN-u-ca-gregory-co-compact
    */
    it('locale_test_2302', 0, function () {
        let locale = new Intl.Locale('zh-Hans-CN');
        console.log('locale_test_2302 ' + locale.maximize().toString());
        expect(locale.maximize().toString()).assertEqual('zh-Hans-CN');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2303
    * @tc.name    test the maximize interface with zh-Hans-CN-u-ca-gregory-co-compact locale
    * @tc.desc    check the maximize method with zh-Hans-CN-u-ca-gregory-co-compact locale
    */
    it('locale_test_2303', 0, function () {
        let locale = new Intl.Locale('zh-Hans-CN-u-ca-gregory-co-compact');
        console.log('locale_test_2303 ' + locale.maximize().toString());
        expect(locale.maximize().toString()).assertEqual('zh-Hans-CN-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2304
    * @tc.name    test the maximize interface with zh locale
    * @tc.desc    check the maximize method with zh locale
    */
    it('locale_test_2304', 0, function () {
        let locale = new Intl.Locale('zh', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_2304 ' + locale.maximize().toString());
        expect(locale.maximize().toString()).assertEqual('zh-Hans-CN-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2305
    * @tc.name    test the maximize interface with zh-CN locale
    * @tc.desc    check the maximize method with zh-CN locale
    */
    it('locale_test_2305', 0, function () {
        let locale = new Intl.Locale('zh-CN', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_2305 ' + locale.maximize().toString());
        expect(locale.maximize().toString()).assertEqual('zh-Hans-CN-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_LOCALE_2306
    * @tc.name    test the maximize interface with zh-Hans-CN locale
    * @tc.desc    check the maximize method with zh-Hans-CN locale
    */
    it('locale_test_2306', 0, function () {
        let locale = new Intl.Locale('zh-Hans-CN', {calendar: 'gregory', collation: 'compact'});
        console.log('locale_test_2306 ' + locale.maximize().toString());
        expect(locale.maximize().toString()).assertEqual('zh-Hans-CN-u-ca-gregory-co-compact');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0100
    * @tc.name    format the datetime with en-GB locale
    * @tc.desc    check the datetime is not null
    */
    it('dateTimeFormat_test_0100', 0, function () {
        let datefmt = new Intl.DateTimeFormat('en-GB');
        expect(datefmt !== null).assertTrue();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0120
    * @tc.name    format the datetime with en-GB locale
    * @tc.desc    check the datetime is not null
    */
    it('dateTimeFormat_test_0120', 0, function () {
        let datefmt = new Intl.DateTimeFormat();
        expect(datefmt !== null).assertTrue();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0200
    * @tc.name    format the date with zh locale
    * @tc.desc    check the date
    */
    it('dateTimeFormat_test_0200', 0, function () {
        let date = new Date(2021, 11, 17, 3, 24, 0);
        let datefmt = new Intl.DateTimeFormat('zh');
        console.log('dateTimeFormat_test_0200 ' + datefmt.format(date));
Y
y00314596 已提交
508
        expect(datefmt.format(date)).assertContain('2021');
J
jiyong_sd 已提交
509 510 511 512 513 514 515 516 517 518 519
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0300
    * @tc.name    format the date with en locale
    * @tc.desc    check the date
    */
    it('dateTimeFormat_test_0300', 0, function () {
        let date = new Date(2021, 11, 17, 3, 24, 0);
        let datefmt = new Intl.DateTimeFormat('en');
        console.log('dateTimeFormat_test_0300 ' + datefmt.format(date));
Y
y00314596 已提交
520
        expect(datefmt.format(date)).assertContain('21');
J
jiyong_sd 已提交
521 522 523 524 525 526 527 528 529 530 531
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0310
    * @tc.name    format the date with en-US locale
    * @tc.desc    check the date
    */
    it('dateTimeFormat_test_0310', 0, function () {
        let date = new Date(2021, 11, 17, 3, 24, 0);
        let datefmt = new Intl.DateTimeFormat('en-US');
        console.log('dateTimeFormat_test_0310 ' + datefmt.format(date));
Y
y00314596 已提交
532
        expect(datefmt.format(date)).assertContain('21');
J
jiyong_sd 已提交
533 534 535 536 537 538 539 540 541 542 543
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0320
    * @tc.name    format the date with en-GB locale
    * @tc.desc    check the date
    */
    it('dateTimeFormat_test_0320', 0, function () {
        let date = new Date(2021, 11, 17, 3, 24, 0);
        let datefmt = new Intl.DateTimeFormat('en-GB');
        console.log('dateTimeFormat_test_0320 ' + datefmt.format(date));
Y
y00314596 已提交
544
        expect(datefmt.format(date)).assertContain('2021');
J
jiyong_sd 已提交
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0400
    * @tc.name    format the date with aa locale
    * @tc.desc    check the date
    */
    it('dateTimeFormat_test_0400', 0, function () {
        let date = new Date(2021, 11, 17, 3, 24, 0);
        let datefmt = new Intl.DateTimeFormat('aa');
        let value = datefmt.format(date);
        console.log('dateTimeFormat_test_0400 ' + value);
        expect(value).assertInstanceOf('String');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0500
    * @tc.name    format the hour with ban and zh locale
    * @tc.desc    check the hour with ban and zh locale
    */
    it('dateTimeFormat_test_0500', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'full' };
        let datefmt = new Intl.DateTimeFormat(['ban', 'zh'], option);
        console.log('dateTimeFormat_test_0500 ' + datefmt.format(date));
        expect(datefmt.format(date)).assertEqual('2020年12月20日星期日');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0600
    * @tc.name    format the hour with en and zh locale
    * @tc.desc    check the hour with en and zh locale
    */
    it('dateTimeFormat_test_0600', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'full' };
        let datefmt = new Intl.DateTimeFormat(['en', 'zh'], option);
        console.log('dateTimeFormat_test_0600 ' + datefmt.format(date));
        expect(datefmt.format(date)).assertEqual('Sunday, December 20, 2020');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0700
    * @tc.name    format the hour with en and ban locale
    * @tc.desc    check the hour with en and ban locale
    */
    it('dateTimeFormat_test_0700', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'full' };
        let datefmt = new Intl.DateTimeFormat(['en', 'ban'], option);
        console.log('dateTimeFormat_test_0700 ' + datefmt.format(date));
        expect(datefmt.format(date)).assertEqual('Sunday, December 20, 2020');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0800
    * @tc.name    format the hour without correct locale
    * @tc.desc    check the hour without correct locale
    */
    it('dateTimeFormat_test_0800', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'full' };
        let datefmt = new Intl.DateTimeFormat(['abc', 'ban'], option);
        console.log('dateTimeFormat_test_0800 ' + datefmt.format(date));
        expect(datefmt.format(date)).assertContain('2020');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_0900
    * @tc.name    format the date with full datestyle and mediu timestyle
    * @tc.desc    check the date with full datestyle and mediu timestyle
    */
    it('dateTimeFormat_test_0900', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'full', timeStyle: 'full' };
        let datefmt = new Intl.DateTimeFormat('zh-Hans-CN', option);
        console.log('dateTimeFormat_test_0900 ' + datefmt.format(date));
        expect(datefmt.format(date)).assertContain('2020年12月20日星期日');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1000
    * @tc.name    format the date dateStyle with long style
    * @tc.desc    check the dateStyle with long style
    */
    it('dateTimeFormat_test_1000', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'long', timeStyle: 'long' };
        let datefmt = new Intl.DateTimeFormat('zh-CN', option);
        console.log('dateTimeFormat_test_1000 ' + datefmt.resolvedOptions().dateStyle);
        expect(datefmt.resolvedOptions().dateStyle).assertEqual('long');
        expect(datefmt.format(date)).assertContain('2020年12月20日');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1100
    * @tc.name    format the date dateStyle with medium style
    * @tc.desc    check the dateStyle with medium style
    */
    it('dateTimeFormat_test_1100', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'medium', timeStyle: 'medium' };
        let datefmt = new Intl.DateTimeFormat('zh-CN', option);
        console.log('dateTimeFormat_test_1100 ' + datefmt.resolvedOptions().dateStyle);
        expect(datefmt.resolvedOptions().dateStyle).assertEqual('medium');
Y
y00314596 已提交
650
        expect(datefmt.format(date)).assertContain('2020年12月20日');
J
jiyong_sd 已提交
651 652 653 654 655 656 657 658 659 660 661 662 663
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1200
    * @tc.name    format the date dateStyle with short style
    * @tc.desc    check the dateStyle with short style
    */
    it('dateTimeFormat_test_1200', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'short', timeStyle: 'short' };
        let datefmt = new Intl.DateTimeFormat('zh-CN', option);
        console.log('dateTimeFormat_test_1200 ' + datefmt.resolvedOptions().dateStyle);
        expect(datefmt.resolvedOptions().dateStyle).assertEqual('short');
Y
y00314596 已提交
664
        expect(datefmt.format(date)).assertContain('2020/12/20');
J
jiyong_sd 已提交
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1300
    * @tc.name    format the date with daterange
    * @tc.desc    check the daterange
    */
    it('dateTimeFormat_test_1300', 0, function () {
        let startdate = new Date(2020, 11, 20, 14, 23, 16);
        let enddate = new Date(2020, 11, 21, 14, 23, 16);
        let datefmt = new Intl.DateTimeFormat('en-GB');
        console.log('dateTimeFormat_test_1300 ' + datefmt.formatRange(startdate, enddate));
        expect(datefmt.formatRange(startdate, enddate)).assertEqual('20/12/2020 – 21/12/2020');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1400
    * @tc.name    format the date with daterange when the start and end date is equal
    * @tc.desc    check the daterange when the start and end date is equal
    */
    it('dateTimeFormat_test_1400', 0, function () {
        let startdate = new Date(2020, 11, 20, 14, 23, 16);
        let enddate = new Date(2020, 11, 20, 14, 23, 16);
        let datefmt = new Intl.DateTimeFormat('en-GB');
        console.log('dateTimeFormat_test_1400 ' + datefmt.formatRange(startdate, enddate));
        expect(datefmt.formatRange(startdate, enddate)).assertEqual('20/12/2020');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1500
    * @tc.name    format the year、month、day、weekday
    * @tc.desc    check the year、month、day、weekday
    */
    it('dateTimeFormat_test_1500', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long' };
        let datefmt = new Intl.DateTimeFormat('ja', option);
        console.log('dateTimeFormat_test_1500 ' + datefmt.format(date));
        expect(datefmt.format(date)).assertEqual('2020年12月20日日曜日');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1600
    * @tc.name    format the timerange with year、month、day、weekday
    * @tc.desc    check the timerange with year、month、day、weekday
    */
    it('dateTimeFormat_test_1600', 0, function () {
        let startdate = new Date(2020, 11, 20, 14, 23, 16);
        let enddate = new Date(2021, 4, 5, 10, 5, 3);
        let option = { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long' };
        let datefmt = new Intl.DateTimeFormat('en', option);
        console.log('dateTimeFormat_test_1600 ' + datefmt.formatRange(startdate, enddate));
        expect(datefmt.formatRange(startdate, enddate)).assertEqual('Sunday, December 20, 2020 – Wednesday, May 5, 2021');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1700
    * @tc.name    format the hour&minute&second
    * @tc.desc    check the hour&minute&second
    */
    it('dateTimeFormat_test_1700', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { year: 'numeric', month: 'long', day: 'numeric',
            hour: 'numeric', minute: '2-digit', second: 'numeric', weekday: 'long', era: 'short' };
        let datefmt = new Intl.DateTimeFormat('zh-CN-u-hc-h12', option);
        console.log('dateTimeFormat_test_1700 ' + datefmt.format(date));
Y
y00314596 已提交
731
        expect(datefmt.format(date)).assertContain('公元2020年12月20日星期日');
J
jiyong_sd 已提交
732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1800
    * @tc.name    format the timeZone
    * @tc.desc    check the timeZone
    */
    it('dateTimeFormat_test_1800', 0, function () {
        let date = new Date(2020, 3, 14, 15, 5, 3);
        let option = { timeZone: 'America/Los_Angeles', timeZoneName: 'long' };
        let datefmt = new Intl.DateTimeFormat('zh-CN-u-hc-h12', option);
        console.log('dateTimeFormat_test_1800 ' + datefmt.format(date));
        expect(datefmt.format(date).indexOf('北美太平洋夏令时间') !== -1).assertTrue();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_1900
    * @tc.name    format the America/Los_Angeles timeZone
    * @tc.desc    check the America/Los_Angeles timeZone
    */
    it('dateTimeFormat_test_1900', 0, function () {
        let option = { timeZone: 'America/Los_Angeles', timeZoneName: 'long' };
        let datefmt = new Intl.DateTimeFormat('zh-CN-u-hc-h12', option);
        console.log('dateTimeFormat_test_1900 ' + datefmt.resolvedOptions().timeZone);
        expect(datefmt.resolvedOptions().timeZone).assertEqual('America/Los_Angeles');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_2000
    * @tc.name    format the America/Los_Angeles timeZoneName
    * @tc.desc    check the America/Los_Angeles timeZoneName
    */
    it('dateTimeFormat_test_2000', 0, function () {
        let option = { timeZone: 'America/Los_Angeles', timeZoneName: 'long' };
        let datefmt = new Intl.DateTimeFormat('zh-CN-u-hc-h12', option);
        console.log('dateTimeFormat_test_2000 ' + datefmt.resolvedOptions().timeZoneName);
        expect(datefmt.resolvedOptions().timeZoneName).assertEqual('long');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_2100
    * @tc.name    format the year
    * @tc.desc    check the year
    */
    it('dateTimeFormat_test_2100', 0, function () {
        let option = { year: 'numeric', month: 'long', day: 'numeric',
            hour: 'numeric', minute: '2-digit', second: 'numeric', weekday: 'long', era: 'short' };
        let datefmt = new Intl.DateTimeFormat('zh-CN-u-hc-h12', option);
        console.log('dateTimeFormat_test_2100 ' + datefmt.resolvedOptions().year);
        expect(datefmt.resolvedOptions().year).assertEqual('numeric');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_2200
    * @tc.name    format the weekday
    * @tc.desc    check the weekday
    */
    it('dateTimeFormat_test_2200', 0, function () {
        let option = { year: 'numeric', month: 'long', day: 'numeric',
            hour: 'numeric', minute: '2-digit', second: 'numeric', weekday: 'long', era: 'short' };
        let datefmt = new Intl.DateTimeFormat('zh-CN-u-hc-h12', option);
        console.log('dateTimeFormat_test_2200 ' + datefmt.resolvedOptions().weekday);
        expect(datefmt.resolvedOptions().weekday).assertEqual('long');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_2300
    * @tc.name    format the hour in zh-CN-u-hc-h12
    * @tc.desc    check the hour in zh-CN-u-hc-h12
    */
    it('dateTimeFormat_test_2300', 0, function () {
        let option = { year: 'numeric', month: 'long', day: 'numeric',
            hour: 'numeric', minute: '2-digit', second: 'numeric', weekday: 'long', era: 'short' };
        let datefmt = new Intl.DateTimeFormat('zh-CN-u-hc-h12', option);
        console.log('dateTimeFormat_test_2300 ' + datefmt.resolvedOptions().hour);
        expect(datefmt.resolvedOptions().hour).assertEqual('numeric');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_2400
    * @tc.name    format the hour in fr-Latn-FR-u-nu-mong
    * @tc.desc    check the hour in fr-Latn-FR-u-nu-mong
    */
    it('dateTimeFormat_test_2400', 0, function () {
        let date = new Date(2020, 11, 20, 14, 23, 16);
        let option = { dateStyle: 'full' };
        let datefmt = new Intl.DateTimeFormat('fr-Latn-FR-u-nu-mong', option);
        console.log('dateTimeFormat_test_2400 ' + datefmt.format(date));
        expect(datefmt.format(date)).assertEqual('dimanche ᠒᠐ décembre ᠒᠐᠒᠐');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_DATETIME_2500
    * @tc.name    format the hour in zh-CN-u-hc-h12 with matcher
    * @tc.desc    check the hour in zh-CN-u-hc-h12 with matcher
    */
    it('dateTimeFormat_test_2500', 0, function () {
        let option = { year: 'numeric', month: 'long', day: 'numeric',
            hour: 'numeric', minute: '2-digit', second: 'numeric', weekday: 'long', era: 'short',
            hourCycle: 'h24',numberingSystem: 'arab', hour12: true, dayPeriod: 'short',
            formatMatcher: 'basic', localeMatcher: 'lookup' };
        let datefmt = new Intl.DateTimeFormat('zh-CN-u-hc-h12', option);
        expect(datefmt.resolvedOptions().locale).assertEqual('zh-CN');
        expect(datefmt.resolvedOptions().hourCycle).assertEqual('h24');
        expect(datefmt.resolvedOptions().numberingSystem).assertEqual('arab');
        expect(datefmt.resolvedOptions().hour12).assertTrue();
        expect(datefmt.resolvedOptions().era).assertEqual('short');
        expect(datefmt.resolvedOptions().month).assertEqual('long');
        expect(datefmt.resolvedOptions().day).assertEqual('numeric');
        expect(datefmt.resolvedOptions().minute).assertEqual('2-digit');
        expect(datefmt.resolvedOptions().second).assertEqual('numeric');
        expect(datefmt.resolvedOptions().dayPeriod).assertEqual('short');
        expect(datefmt.resolvedOptions().formatMatcher).assertEqual('basic');
        expect(datefmt.resolvedOptions().localeMatcher).assertEqual('lookup');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0100
    * @tc.name    format the number in zh
    * @tc.desc    check the number in zh
    */
    it('formatNumber_test_0100', 0, function () {
        let numfmt = new Intl.NumberFormat('zh');
        console.log('formatNumber_test_0100 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0120
    * @tc.name    format the number with default locale
    * @tc.desc    check the number with default locale
    */
    it('formatNumber_test_0120', 0, function () {
        let numfmt = new Intl.NumberFormat();
        expect(numfmt !== null).assertTrue();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0200
    * @tc.name    format the number in zh-u-nu-latn
    * @tc.desc    check the number in zh-u-nu-latn
    */
    it('formatNumber_test_0200', 0, function () {
        let numfmt = new Intl.NumberFormat('zh-u-nu-latn');
        console.log('formatNumber_test_0200 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0300
    * @tc.name    format the number in zh-u-nu-arab
    * @tc.desc    check the number in zh-u-nu-arab
    */
    it('formatNumber_test_0300', 0, function () {
        let numfmt = new Intl.NumberFormat('zh-u-nu-arab');
        console.log('formatNumber_test_0300 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('١٢٣٬٤٥٦٫٧٨٩');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0400
    * @tc.name    format the number in en
    * @tc.desc    check the number in en
    */
    it('formatNumber_test_0400', 0, function () {
        let numfmt = new Intl.NumberFormat('en');
        console.log('formatNumber_test_0400 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0500
    * @tc.name    format the number in en-u-nu-thai
    * @tc.desc    check the number in en-u-nu-thai
    */
    it('formatNumber_test_0500', 0, function () {
        let numfmt = new Intl.NumberFormat('en-u-nu-thai');
        console.log('formatNumber_test_0500 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('๑๒๓,๔๕๖.๗๘๙');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0600
    * @tc.name    format the number in en-GB
    * @tc.desc    check the number in en-GB
    */
    it('formatNumber_test_0600', 0, function () {
        let numfmt = new Intl.NumberFormat('en-GB');
        console.log('formatNumber_test_0600 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0700
    * @tc.name    format the number in en-US
    * @tc.desc    check the number in en-US
    */
    it('formatNumber_test_0700', 0, function () {
        let numfmt = new Intl.NumberFormat('en-US');
        console.log('formatNumber_test_0700 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0800
    * @tc.name    format the number in aa
    * @tc.desc    check the number in aa
    */
    it('formatNumber_test_0800', 0, function () {
        let numfmt = new Intl.NumberFormat('aa');
        console.log('formatNumber_test_0800 ' + numfmt.format(123456.789));
        let lang = I18n.getSystemLanguage();
        if (lang === 'zh') {
            expect(numfmt.format(123456.789)).assertEqual('123,456.789');
        }
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_0900
    * @tc.name    format the number in zh and en list
    * @tc.desc    check the number in zh and en list
    */
    it('formatNumber_test_0900', 0, function () {
        let numfmt = new Intl.NumberFormat(['zh','en']);
        console.log('formatNumber_test_0900 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1000
    * @tc.name    format the number in en and zh list
    * @tc.desc    check the number in en and zh list
    */
    it('formatNumber_test_1000', 0, function () {
        let numfmt = new Intl.NumberFormat(['en','zh']);
        console.log('formatNumber_test_1000 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1100
    * @tc.name    format the number in en and aa list
    * @tc.desc    check the number in en and aa list
    */
    it('formatNumber_test_1100', 0, function () {
        let numfmt = new Intl.NumberFormat(['en','aa']);
        console.log('formatNumber_test_1100 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1200
    * @tc.name    format the number in aa and zh list
    * @tc.desc    check the number in aa and zh list
    */
    it('formatNumber_test_1200', 0, function () {
        let numfmt = new Intl.NumberFormat(['aa','zh']);
        console.log('formatNumber_test_1200 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1300
    * @tc.name    format the number in aa and bb list
    * @tc.desc    check the number in aa and bb list
    */
    it('formatNumber_test_1300', 0, function () {
        let numfmt = new Intl.NumberFormat(['aa','bb']);
        console.log('formatNumber_test_1300 ' + numfmt.format(123456.789));
        let lang = I18n.getSystemLanguage();
        if (lang === 'zh') {
            expect(numfmt.format(123456.789)).assertEqual('123,456.789');
        }
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1400
    * @tc.name    format the number in aa bb and es list
    * @tc.desc    check the number in aa  bb and es list
    */
    it('formatNumber_test_1400', 0, function () {
        let numfmt = new Intl.NumberFormat(['aa','bb','es']);
        console.log('formatNumber_test_1400 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123.456,789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1500
    * @tc.name    format the number in aa it and bb list
    * @tc.desc    check the number in aa it and bb list
    */
    it('formatNumber_test_1500', 0, function () {
        let numfmt = new Intl.NumberFormat(['aa','it','bb']);
        console.log('formatNumber_test_1500 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123.456,789');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1600
    * @tc.name    format the number with scientific
    * @tc.desc    check the number with scientific
    */
    it('formatNumber_test_1600', 0, function () {
        let numfmt = new Intl.NumberFormat('en-GB', { style: 'decimal', notation: 'scientific' });
        console.log('formatNumber_test_1600 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('1.234568E5');
        expect(numfmt.resolvedOptions().style).assertEqual('decimal');
        expect(numfmt.resolvedOptions().notation).assertEqual('scientific');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1700
    * @tc.name    format the number with currency EUR
    * @tc.desc    check the number with currency EUR
    */
    it('formatNumber_test_1700', 0, function () {
        let numfmt = new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'EUR',
            currencyDisplay: 'name', currencySign: 'accounting', signDisplay: 'always' });
        console.log('formatNumber_test_1700 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('+123,456.79 euros');
        expect(numfmt.resolvedOptions().locale).assertEqual('en-GB');
        expect(numfmt.resolvedOptions().style).assertEqual('currency');
        expect(numfmt.resolvedOptions().currency).assertEqual('EUR');
        expect(numfmt.resolvedOptions().currencyDisplay).assertEqual('name');
        expect(numfmt.resolvedOptions().currencySign).assertEqual('accounting');
        expect(numfmt.resolvedOptions().signDisplay).assertEqual('always');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1800
    * @tc.name    format the number with currency USD
    * @tc.desc    check the number with currency USD
    */
    it('formatNumber_test_1800', 0, function () {
        let numfmt = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD',
            currencyDisplay: 'code', currencySign: 'accounting', signDisplay: 'always' });
        console.log('formatNumber_test_1800 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertContain('+USD');
        expect(numfmt.format(123456.789)).assertContain('123,456.79');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_1900
    * @tc.name    format the number with currency CNY
    * @tc.desc    check the number with currency CNY
    */
    it('formatNumber_test_1900', 0, function () {
        let numfmt = new Intl.NumberFormat('zh-CN', { style: 'currency', currency: 'CNY',
            currencyDisplay: 'symbol', currencySign: 'accounting', signDisplay: 'always' });
        console.log('formatNumber_test_1900 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('+¥123,456.79');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2000
    * @tc.name    format the number with currency JPY
    * @tc.desc    check the number with currency JPY
    */
    it('formatNumber_test_2000', 0, function () {
        let numfmt = new Intl.NumberFormat('ja-JP', { style: 'currency', currency: 'JPY',
            currencyDisplay: 'narrowSymbol', currencySign: 'accounting', signDisplay: 'always' });
        console.log('formatNumber_test_2000 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('+¥123,457');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2100
    * @tc.name    format the number with signDisplay
    * @tc.desc    check the number with signDisplay
    */
    it('formatNumber_test_2100', 0, function () {
        let numfmt = new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'EUR',
            currencyDisplay: 'name', currencySign: 'accounting', signDisplay: 'always',
            notation: 'compact', compactDisplay: 'long', localeMatcher: 'lookup' });
        console.log('formatNumber_test_2100 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('+123 thousand euros');
        expect(numfmt.resolvedOptions().locale).assertEqual('en-GB');
        expect(numfmt.resolvedOptions().style).assertEqual('currency');
        expect(numfmt.resolvedOptions().currency).assertEqual('EUR');
        expect(numfmt.resolvedOptions().currencyDisplay).assertEqual('name');
        expect(numfmt.resolvedOptions().currencySign).assertEqual('accounting');
        expect(numfmt.resolvedOptions().compactDisplay).assertEqual('long');
        expect(numfmt.resolvedOptions().localeMatcher).assertEqual('lookup');
        expect(numfmt.resolvedOptions().signDisplay).assertEqual('always');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2200
    * @tc.name    format the number with  meter unit
    * @tc.desc    check the number with meter unit
    */
    it('formatNumber_test_2200', 0, function () {
        let numfmt = new Intl.NumberFormat('zh-CN', { style: 'unit', unit: 'meter',
            unitDisplay: 'long', maximumFractionDigits: 2, minimumIntegerDigits: 7 });
        console.log('formatNumber_test_2200 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('0,123,456.79米');
        expect(numfmt.resolvedOptions().style).assertEqual('unit');
        expect(numfmt.resolvedOptions().unit).assertEqual('meter');
        expect(numfmt.resolvedOptions().unitDisplay).assertEqual('long');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2250
    * @tc.name    format the number with unitUsage
    * @tc.desc    check the number with unitUsage
    */
    it('formatNumber_test_2250', 0, function () {
        let numfmt = new Intl.NumberFormat('zh-CN', { style: 'unit', unit: 'meter',
            unitDisplay: 'long', unitUsage: 'length-road' });
        console.log('formatNumber_test_2250 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789米');
        expect(numfmt.resolvedOptions().unitUsage).assertEqual('length-road');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2260
    * @tc.name    format the number with narrow value in unitUsage param
    * @tc.desc    check the number with unitUsage
    */
    it('formatNumber_test_2260', 0, function () {
        let numfmt = new Intl.NumberFormat('zh-CN', { style: 'unit', unit: 'meter',
            unitDisplay: 'narrow', unitUsage: 'length-road' });
        console.log('formatNumber_test_2260 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789米');
        expect(numfmt.resolvedOptions().unitUsage).assertEqual('length-road');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2270
    * @tc.name    format the number with short value in unitUsage param
    * @tc.desc    check the number with unitUsage
    */
    it('formatNumber_test_2270', 0, function () {
        let numfmt = new Intl.NumberFormat('zh-CN', { style: 'unit', unit: 'meter',
            unitDisplay: 'short', unitUsage: 'length-road' });
        console.log('formatNumber_test_2270 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('123,456.789米');
        expect(numfmt.resolvedOptions().unitUsage).assertEqual('length-road');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2280
    * @tc.name    format the number with narrow value in unitUsage param
    * @tc.desc    check the number with unitUsage
    */
    it('formatNumber_test_2280', 0, function () {
        let numfmt = new Intl.NumberFormat('en-US', { style: 'unit', unit: 'meter',
            unitDisplay: 'narrow', unitUsage: 'length-road' });
        console.log('formatNumber_test_2280 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('76.712mi');
        expect(numfmt.resolvedOptions().unitUsage).assertEqual('length-road');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2290
    * @tc.name    format the number with short value in unitUsage param
    * @tc.desc    check the number with unitUsage
    */
    it('formatNumber_test_2290', 0, function () {
        let numfmt = new Intl.NumberFormat('en-US', { style: 'unit', unit: 'meter',
            unitDisplay: 'short', unitUsage: 'length-road' });
        console.log('formatNumber_test_2290 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('76.712 mi');
        expect(numfmt.resolvedOptions().unitUsage).assertEqual('length-road');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2300
    * @tc.name    format the number with percetn style
    * @tc.desc    check the number with percetn style
    */
    it('formatNumber_test_2300', 0, function () {
        let numfmt = new Intl.NumberFormat('en-CN', { style: 'percent', maximumFractionDigits: 2,
            minimumIntegerDigits: 7 });
        console.log('formatNumber_test_2300 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('0,123,456.79%');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2400
    * @tc.name    format the number with numberingSystem
    * @tc.desc    check the number with numberingSystem
    */
    it('formatNumber_test_2400', 0, function () {
        let numfmt = new Intl.NumberFormat('ar-EG', { numberingSystem: 'arab' });
        console.log('formatNumber_test_2400 ' + numfmt.format(123456.789));
        expect(numfmt.format(123456.789)).assertEqual('١٢٣٬٤٥٦٫٧٨٩');
        expect(numfmt.resolvedOptions().numberingSystem).assertEqual('arab');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_NUMBER_2500
    * @tc.name    format the number with style
    * @tc.desc    check the number with style
    */
    it('formatNumber_test_2500', 0, function () {
        let numfmt = new Intl.NumberFormat('ar', { style: 'percent', minimumFractionDigits: 1, maximumFractionDigits: 2,
            minimumIntegerDigits: 7, minimumSignificantDigits: 5, maximumSignificantDigits: 10, useGrouping: true  });
        console.log('formatNumber_test_2500 ' + numfmt.resolvedOptions().style);
        expect(numfmt.resolvedOptions().style).assertEqual('percent');
        expect(numfmt.resolvedOptions().minimumFractionDigits).assertEqual(1);
        expect(numfmt.resolvedOptions().maximumFractionDigits).assertEqual(2);
        expect(numfmt.resolvedOptions().minimumIntegerDigits).assertEqual(7);
        expect(numfmt.resolvedOptions().minimumSignificantDigits).assertEqual(5);
        expect(numfmt.resolvedOptions().maximumSignificantDigits).assertEqual(10);
        expect(numfmt.resolvedOptions().useGrouping).assertTrue();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_2600
    * @tc.name    get PluralRules
    * @tc.desc    check the select result
    */
    it('pluralrules_test_2600', 0, function () {
        let pl = new Intl.PluralRules();
        let value = pl.select(0);
        console.log('pluralrules_test_2600 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_2700
    * @tc.name    get PluralRules with zh locale
    * @tc.desc    check the select result
    */
    it('pluralrules_test_2700', 0, function () {
        let pl = new Intl.PluralRules('zh');
        let value = pl.select(0);
        console.log('pluralrules_test_2700 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_2800
    * @tc.name    get PluralRules with zh locale and ordinal type
    * @tc.desc    check the select result
    */
    it('pluralrules_test_2800', 0, function () {
        let pl = new Intl.PluralRules('zh', {'type': 'ordinal'});
        let value = pl.select(0);
        console.log('pluralrules_test_2800 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_2900
    * @tc.name    get PluralRules with zh locale and loolup localeMatcher
    * @tc.desc    check the select result
    */
    it('pluralrules_test_2900', 0, function () {
        let pl = new Intl.PluralRules('zh', {'localeMatcher': 'lookup'});
        let value = pl.select(0);
        console.log('pluralrules_test_2900 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_3000
    * @tc.name    get PluralRules with zh locale and minimumIntegerDigits options
    * @tc.desc    check the select result
    */
    it('pluralrules_test_3000', 0, function () {
        let pl = new Intl.PluralRules('zh', {'minimumIntegerDigits': 10});
        let value = pl.select(0);
        console.log('pluralrules_test_3000 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_3100
    * @tc.name    get PluralRules with zh locale and minimumFractionDigits options
    * @tc.desc    check the select result
    */
    it('pluralrules_test_3100', 0, function () {
        let pl = new Intl.PluralRules('zh', {'minimumFractionDigits': 11});
        let value = pl.select(0);
        console.log('pluralrules_test_3100 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_3200
    * @tc.name    get PluralRules with zh locale and maximumFractionDigits options
    * @tc.desc    check the select result
    */
    it('pluralrules_test_3200', 0, function () {
        let pl = new Intl.PluralRules('zh', {'maximumFractionDigits': 'lookup'});
        let value = pl.select(0);
        console.log('pluralrules_test_3200 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_3300
    * @tc.name    get PluralRules with zh locale and minimumSignificantDigits options
    * @tc.desc    check the select result
    */
    it('pluralrules_test_3300', 0, function () {
        let pl = new Intl.PluralRules('zh', {'minimumSignificantDigits': 10});
        let value = pl.select(0);
        console.log('pluralrules_test_3300 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_PLURAL_3400
    * @tc.name    get PluralRules with zh locale and maximumSignificantDigits options
    * @tc.desc    check the select result
    */
    it('pluralrules_test_3400', 0, function () {
        let pl = new Intl.PluralRules('zh', {'maximumSignificantDigits': 11});
        let value = pl.select(0);
        console.log('pluralrules_test_3400 ' + value);
        expect(value).assertEqual('other');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_3500
    * @tc.name    compare two different strings
    * @tc.desc    check the compare result
    */
    it('collator_test_3500', 0, function () {
        let coll = new Intl.Collator();
        let value = coll.compare('a', 'b');
        console.log('collator_test_3500 ' + value);
        expect(value).assertEqual(-1);
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_3510
    * @tc.name    compare the same strings
    * @tc.desc    check the compare result
    */
    it('collator_test_3510', 0, function () {
        let coll = new Intl.Collator();
        let value = coll.compare('a', 'a');
        console.log('collator_test_3100 ' + value);
        expect(value).assertEqual(0);
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_3520
    * @tc.name    compare two different strings and return positive value
    * @tc.desc    check the compare result
    */
    it('collator_test_3520', 0, function () {
        let coll = new Intl.Collator();
        let value = coll.compare('b', 'a');
        console.log('collator_test_3200 ' + value);
        expect(value).assertEqual(1);
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_3600
    * @tc.name    compare two different strings with zh locale
    * @tc.desc    check the compare result
    */
    it('collator_test_3600', 0, function () {
        let coll = new Intl.Collator('zh');
        let value = coll.compare('a', 'b');
        console.log('collator_test_3600 ' + value);
        expect(value).assertEqual(-1);
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_3700
    * @tc.name    compare two different strings with zh locale and eor collation
    * @tc.desc    check the compare result
    */
    it('collator_test_3700', 0, function () {
        let coll = new Intl.Collator('zh', {'collation': 'eor'});
        let value = coll.compare('a', 'b');
        console.log('collator_test_3700 ' + value);
        expect(value).assertEqual(-1);
        expect(coll.resolvedOptions().collation).assertEqual('eor');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_3800
    * @tc.name    compare two different strings with zh locale and base sensitivity
    * @tc.desc    check the compare result
    */
    it('collator_test_3800', 0, function () {
        let coll = new Intl.Collator('zh', {'sensitivity': 'base'});
        let value = coll.compare('a', 'b');
        console.log('collator_test_3800 ' + value);
        expect(value).assertEqual(-1);
        expect(coll.resolvedOptions().sensitivity).assertEqual('base');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_3900
    * @tc.name    compare two different strings with zh locale and upper caseFirst
    * @tc.desc    check the compare result
    */
    it('collator_test_3900', 0, function () {
        let coll = new Intl.Collator('zh', {'caseFirst': 'upper'});
        let value = coll.compare('a', 'b');
        console.log('collator_test_3900 ' + value);
        expect(value).assertEqual(-1);
        expect(coll.resolvedOptions().caseFirst).assertEqual('upper');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_4000
    * @tc.name    compare two different strings with zh locale and true numeric
    * @tc.desc    check the compare result
    */
    it('collator_test_4000', 0, function () {
        let coll = new Intl.Collator('zh', {'numeric': true});
        let value = coll.compare('a', 'b');
        console.log('collator_test_4000 ' + value);
        expect(value).assertEqual(-1);
        expect(coll.resolvedOptions().numeric).assertTrue();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_4100
    * @tc.name    compare two different strings with zh locale and true ignorePunctuation
    * @tc.desc    check the compare result
    */
    it('collator_test_4100', 0, function () {
        let coll = new Intl.Collator('zh', {'ignorePunctuation': true});
        let value = coll.compare('a', 'b');
        console.log('collator_test_4100 ' + value);
        expect(value).assertEqual(-1);
        expect(coll.resolvedOptions().ignorePunctuation).assertTrue();
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_4200
    * @tc.name    compare two different strings with zh locale and sort usage
    * @tc.desc    check the compare result
    */
    it('collator_test_4200', 0, function () {
        let coll = new Intl.Collator('zh', {'usage': 'sort'});
        let value = coll.compare('a', 'b');
        console.log('collator_test_4200 ' + value);
        expect(value).assertEqual(-1);
        expect(coll.resolvedOptions().usage).assertEqual('sort');
    })

    /* *
    * @tc.number  SUB_GLOBAL_INTL_JS_COLLATOR_4300
    * @tc.name    compare the string with localeMatcher options
    * @tc.desc    check the compare result
    */
    it('collator_test_4300', 0, function () {
        let coll = new Intl.Collator('zh', {'localeMatcher': 'lookup'});
        let value = coll.compare('a', 'b');
        console.log('collator_test_4300 ' + value);
        expect(value).assertEqual(-1);
        expect(coll.resolvedOptions().localeMatcher).assertEqual('lookup');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0100
    * @tc.name    format the relativetime with 100 second
    * @tc.desc    check the relativetime
    */
    it('i18n_test_relativetimeformat_0100', 0, function () {
        console.log('i18n_test_relativetimeformat_0100 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat();
        let value = relativetimefmt.format(100,'second');
        console.log('i18n_test_relativetimeformat_0100 ' + value);
        expect(value).assertContain('100');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0200
    * @tc.name    format the relativetime with 100 second in en
    * @tc.desc    check the relativetime
    */
    it('i18n_test_relativetimeformat_0200', 0, function () {
        console.log('i18n_test_relativetimeformat_0200 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat('en');
        let value = relativetimefmt.format(100,'second');
        console.log('i18n_test_relativetimeformat_0200 ' + value);
        expect(value).assertEqual('in 100 seconds');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0300
    * @tc.name    format the relativetime with 100 second in narrow style
    * @tc.desc    check the relativetime
    */
    it('i18n_test_relativetimeformat_0300', 0, function () {
        console.log('i18n_test_relativetimeformat_0300 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat('en', { style: 'narrow' });
        let value = relativetimefmt.format(100,'second');
        console.log('i18n_test_relativetimeformat_0300 ' + value);
        expect(value).assertEqual('in 100 sec.');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0400
    * @tc.name    format the relativetime with 100 second, get the formatToParts value
    * @tc.desc    check the formatToParts value 
    */
    it('i18n_test_relativetimeformat_0400', 0, function () {
        console.log('i18n_test_relativetimeformat_0400 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat('en');
        let value = relativetimefmt.formatToParts(100,'second');
        console.log('i18n_test_relativetimeformat_0400 ' + value[0].value + 'value');
        expect(value[0].value).assertEqual('in ');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0500
    * @tc.name    format the relativetime, get the locale options
    * @tc.desc    check the relativetime
    */
    it('i18n_test_relativetimeformat_0500', 0, function () {
        console.log('i18n_test_relativetimeformat_0500 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat('en');
        let value = relativetimefmt.resolvedOptions();
        console.log('i18n_test_relativetimeformat_0500 ' + value);
        expect(value.locale).assertEqual('en');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0600
    * @tc.name    format the relativetime, get the style options
    * @tc.desc    check the relativetime
    */
    it('i18n_test_relativetimeformat_0600', 0, function () {
        console.log('i18n_test_relativetimeformat_0600 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat('en');
        let value = relativetimefmt.resolvedOptions();
        console.log('i18n_test_relativetimeformat_0600 ' + value);
        expect(value.style).assertEqual('long');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0700
    * @tc.name    format the relativetime, get the numeric options
    * @tc.desc    check the relativetime
    */
    it('i18n_test_relativetimeformat_0700', 0, function () {
        console.log('i18n_test_relativetimeformat_0700 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat('en');
        let value = relativetimefmt.resolvedOptions();
        console.log('i18n_test_relativetimeformat_0700 ' + value);
        expect(value.numeric).assertEqual('always');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0800
    * @tc.name    format the relativetime, get the numberingSystem options
    * @tc.desc    check the relativetime
    */
    it('i18n_test_relativetimeformat_0800', 0, function () {
        console.log('i18n_test_relativetimeformat_0800 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat('en');
        let value = relativetimefmt.resolvedOptions();
        console.log('i18n_test_relativetimeformat_0800 ' + value.numberingSystem);
        expect(value.numberingSystem).assertEqual('latn');
    })

    /* *
    * @tc.number  SUB_GLOBAL_I18N_JS_RELATIVETIMEFORMAT_0900
    * @tc.name    format the relativetime with localeMatcher options
    * @tc.desc    check the relativetime
    */
    it('i18n_test_relativetimeformat_0900', 0, function () {
        console.log('i18n_test_relativetimeformat_0900 ' + 'start');
        let relativetimefmt = new Intl.RelativeTimeFormat('en', { localeMatcher: 'best fit', numeric: 'auto', style: 'narrow' });
        let value = relativetimefmt.resolvedOptions();
        console.log('i18n_test_relativetimeformat_0900 ' + value);
        expect(value.numeric).assertEqual('auto');
        expect(value.style).assertEqual('narrow');
    })

    console.log('*************end IntlTest*************');
})}