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

!1595 modify testcases on 20220117

Merge pull request !1595 from 杨清/1228
......@@ -281,7 +281,7 @@ describe('I18nTest', function () {
let lang = I18n.getSystemLanguages();
let len = lang.length;
console.log('i18n_test_2100 ' + len);
expect(len).assertEqual(0);
expect(len).assertEqual(2);
})
/* *
......@@ -355,7 +355,7 @@ describe('I18nTest', function () {
expect(region).assertTrue();
let value = I18n.isSuggested('en');
console.log('i18n_test_2300 ' + value);
expect(value).assertFalse();
expect(value).assertTrue();
})
/* *
......@@ -369,7 +369,7 @@ describe('I18nTest', function () {
expect(region).assertTrue();
let value = I18n.isSuggested('zh-Hans');
console.log('i18n_test_2400 ' + value);
expect(value).assertFalse();
expect(value).assertTrue();
})
/* *
......@@ -383,7 +383,7 @@ describe('I18nTest', function () {
expect(region).assertTrue();
let value = I18n.isSuggested('zh-Hans-CN');
console.log('i18n_test_2500 ' + value);
expect(value).assertFalse();
expect(value).assertTrue();
})
/* *
......@@ -521,7 +521,7 @@ describe('I18nTest', function () {
it('i18n_test_3600', 0, function () {
let value = I18n.isSuggested('zh-Hans-TW', 'CN');
console.log('i18n_test_3600 ' + value);
expect(value).assertFalse();
expect(value).assertTrue();
})
/* *
......@@ -532,7 +532,7 @@ describe('I18nTest', function () {
it('i18n_test_3700', 0, function () {
let value = I18n.isSuggested('zh-Hans-CN', 'HK');
console.log('i18n_test_3700 ' + value);
expect(value).assertFalse();
expect(value).assertTrue();
})
/* *
......@@ -1062,19 +1062,19 @@ describe('I18nTest', function () {
*/
it('i18n_test_7920', 0, function () {
console.error('i18n_test_7920 ' + 'start');
let calendar = I18n.getCalendar('jp', 'japanese');
let name = calendar.getDisplayName('jp');
let calendar = I18n.getCalendar('ja', 'japanese');
let name = calendar.getDisplayName('ja');
console.error('i18n_test_7920 ' + name);
expect(name).assertEqual('公历');
expect(name).assertEqual('和暦');
let timezone = calendar.getTimeZone();
console.error('i18n_test_7920 ' + timezone);
expect(name).assertEqual('timezone');
expect(timezone).assertEqual('Coordinated Universal Time');
let firstday = calendar.getFirstDayOfWeek();
console.error('i18n_test_7920 ' + firstday);
expect(name).assertEqual(2);
expect(firstday).assertEqual(1);
let miniday = calendar.getMinimalDaysInFirstWeek();
console.error('i18n_test_7920 ' + miniday);
expect(name).assertEqual(1);
expect(miniday).assertEqual(1);
let value = calendar.isWeekend(new Date(2022, 10, 1, 10, 0, 0, 0));
console.error('i18n_test_7920 ' + value);
expect(value).assertFalse();
......@@ -1153,9 +1153,11 @@ describe('I18nTest', function () {
it('i18n_test_8120', 0, function () {
console.error('i18n_test_8120 ' + 'start');
let calendar = I18n.getCalendar('zh');
let date1 = new Date(2021, 8, 8, 8, 8, 8, 8);
calendar.setTime(date1);
let value = calendar.get('month');
console.error('i18n_test_8120 ' + value);
expect(value).assertLarger(0);
expect(value).assertEqual(8);
})
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册