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

!1500 modify testcases on 20220106

Merge pull request !1500 from 杨清/1228
...@@ -1056,6 +1056,19 @@ describe('intlTest', function () { ...@@ -1056,6 +1056,19 @@ describe('intlTest', function () {
expect(numfmt.format(123456.789)).assertEqual('+¥123,457'); 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.number SUB_GLOBAL_INTL_JS_NUMBER_2100
* @tc.name format the number with signDisplay * @tc.name format the number with signDisplay
......
...@@ -242,6 +242,7 @@ describe('resMgrTest', function () { ...@@ -242,6 +242,7 @@ describe('resMgrTest', function () {
dc.screenDensity = ScreenDensity.SCREEN_XXLDPI; dc.screenDensity = ScreenDensity.SCREEN_XXLDPI;
dc.deviceType = DeviceType.DEVICE_TYPE_WEARABLE; dc.deviceType = DeviceType.DEVICE_TYPE_WEARABLE;
dc.screenDensity = ScreenDensity.SCREEN_XXXLDPI; dc.screenDensity = ScreenDensity.SCREEN_XXXLDPI;
dc.deviceType = DeviceType.DEVICE_TYPE_PC;
expect(dc !== null).assertTrue(); expect(dc !== null).assertTrue();
console.log('getDeviceCapability_test_002 ' + dc); console.log('getDeviceCapability_test_002 ' + dc);
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册