提交 71fa5a8e 编写于 作者: Y y00314596

modify cases by yangqing3@huawei.com

Signed-off-by: Ny00314596 <yangqing3@huawei.com>
上级 64e61206
...@@ -281,7 +281,7 @@ describe('I18nTest', function () { ...@@ -281,7 +281,7 @@ describe('I18nTest', function () {
let lang = I18n.getSystemLanguages(); let lang = I18n.getSystemLanguages();
let len = lang.length; let len = lang.length;
console.log('i18n_test_2100 ' + len); console.log('i18n_test_2100 ' + len);
expect(len).assertEqual(0); expect(len).assertEqual(2);
}) })
/* * /* *
...@@ -355,7 +355,7 @@ describe('I18nTest', function () { ...@@ -355,7 +355,7 @@ describe('I18nTest', function () {
expect(region).assertTrue(); expect(region).assertTrue();
let value = I18n.isSuggested('en'); let value = I18n.isSuggested('en');
console.log('i18n_test_2300 ' + value); console.log('i18n_test_2300 ' + value);
expect(value).assertFalse(); expect(value).assertTrue();
}) })
/* * /* *
...@@ -369,7 +369,7 @@ describe('I18nTest', function () { ...@@ -369,7 +369,7 @@ describe('I18nTest', function () {
expect(region).assertTrue(); expect(region).assertTrue();
let value = I18n.isSuggested('zh-Hans'); let value = I18n.isSuggested('zh-Hans');
console.log('i18n_test_2400 ' + value); console.log('i18n_test_2400 ' + value);
expect(value).assertFalse(); expect(value).assertTrue();
}) })
/* * /* *
...@@ -383,7 +383,7 @@ describe('I18nTest', function () { ...@@ -383,7 +383,7 @@ describe('I18nTest', function () {
expect(region).assertTrue(); expect(region).assertTrue();
let value = I18n.isSuggested('zh-Hans-CN'); let value = I18n.isSuggested('zh-Hans-CN');
console.log('i18n_test_2500 ' + value); console.log('i18n_test_2500 ' + value);
expect(value).assertFalse(); expect(value).assertTrue();
}) })
/* * /* *
...@@ -521,7 +521,7 @@ describe('I18nTest', function () { ...@@ -521,7 +521,7 @@ describe('I18nTest', function () {
it('i18n_test_3600', 0, function () { it('i18n_test_3600', 0, function () {
let value = I18n.isSuggested('zh-Hans-TW', 'CN'); let value = I18n.isSuggested('zh-Hans-TW', 'CN');
console.log('i18n_test_3600 ' + value); console.log('i18n_test_3600 ' + value);
expect(value).assertFalse(); expect(value).assertTrue();
}) })
/* * /* *
...@@ -532,7 +532,7 @@ describe('I18nTest', function () { ...@@ -532,7 +532,7 @@ describe('I18nTest', function () {
it('i18n_test_3700', 0, function () { it('i18n_test_3700', 0, function () {
let value = I18n.isSuggested('zh-Hans-CN', 'HK'); let value = I18n.isSuggested('zh-Hans-CN', 'HK');
console.log('i18n_test_3700 ' + value); console.log('i18n_test_3700 ' + value);
expect(value).assertFalse(); expect(value).assertTrue();
}) })
/* * /* *
...@@ -1062,19 +1062,19 @@ describe('I18nTest', function () { ...@@ -1062,19 +1062,19 @@ describe('I18nTest', function () {
*/ */
it('i18n_test_7920', 0, function () { it('i18n_test_7920', 0, function () {
console.error('i18n_test_7920 ' + 'start'); console.error('i18n_test_7920 ' + 'start');
let calendar = I18n.getCalendar('jp', 'japanese'); let calendar = I18n.getCalendar('ja', 'japanese');
let name = calendar.getDisplayName('jp'); let name = calendar.getDisplayName('ja');
console.error('i18n_test_7920 ' + name); console.error('i18n_test_7920 ' + name);
expect(name).assertEqual('公历'); expect(name).assertEqual('和暦');
let timezone = calendar.getTimeZone(); let timezone = calendar.getTimeZone();
console.error('i18n_test_7920 ' + timezone); console.error('i18n_test_7920 ' + timezone);
expect(name).assertEqual('timezone'); expect(timezone).assertEqual('Coordinated Universal Time');
let firstday = calendar.getFirstDayOfWeek(); let firstday = calendar.getFirstDayOfWeek();
console.error('i18n_test_7920 ' + firstday); console.error('i18n_test_7920 ' + firstday);
expect(name).assertEqual(2); expect(firstday).assertEqual(1);
let miniday = calendar.getMinimalDaysInFirstWeek(); let miniday = calendar.getMinimalDaysInFirstWeek();
console.error('i18n_test_7920 ' + miniday); 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)); let value = calendar.isWeekend(new Date(2022, 10, 1, 10, 0, 0, 0));
console.error('i18n_test_7920 ' + value); console.error('i18n_test_7920 ' + value);
expect(value).assertFalse(); expect(value).assertFalse();
...@@ -1153,9 +1153,11 @@ describe('I18nTest', function () { ...@@ -1153,9 +1153,11 @@ describe('I18nTest', function () {
it('i18n_test_8120', 0, function () { it('i18n_test_8120', 0, function () {
console.error('i18n_test_8120 ' + 'start'); console.error('i18n_test_8120 ' + 'start');
let calendar = I18n.getCalendar('zh'); let calendar = I18n.getCalendar('zh');
let date1 = new Date(2021, 8, 8, 8, 8, 8, 8);
calendar.setTime(date1);
let value = calendar.get('month'); let value = calendar.get('month');
console.error('i18n_test_8120 ' + value); 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.
先完成此消息的编辑!
想要评论请 注册