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 510c1b705abcd6b80dd2d8cb0b3da46c578b013f..9390855e17cc9688dd99253ca8ce738762d2f8a7 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 @@ -1056,6 +1056,19 @@ describe('intlTest', function () { expect(numfmt.format(123456.789)).assertEqual('+¥123,457'); }) + /* * + * @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_2100 * @tc.name format the number with signDisplay diff --git a/global/resmgr_standard/resmgrjs/src/main/js/default/test/Resmgr.test.js b/global/resmgr_standard/resmgrjs/src/main/js/default/test/Resmgr.test.js index a19ee14fec57a17647e07caa6e405d8e5f032343..d0af514b4fb9a3ea741121ce1950d794dff43467 100755 --- a/global/resmgr_standard/resmgrjs/src/main/js/default/test/Resmgr.test.js +++ b/global/resmgr_standard/resmgrjs/src/main/js/default/test/Resmgr.test.js @@ -242,6 +242,7 @@ describe('resMgrTest', function () { dc.screenDensity = ScreenDensity.SCREEN_XXLDPI; dc.deviceType = DeviceType.DEVICE_TYPE_WEARABLE; dc.screenDensity = ScreenDensity.SCREEN_XXXLDPI; + dc.deviceType = DeviceType.DEVICE_TYPE_PC; expect(dc !== null).assertTrue(); console.log('getDeviceCapability_test_002 ' + dc); })