From 0b63da332168601a146a7328d3e19c41c6e3e9dc Mon Sep 17 00:00:00 2001 From: y00314596 Date: Wed, 14 Sep 2022 19:48:29 +0800 Subject: [PATCH] add by yangqing3@huawei.com Signed-off-by: y00314596 --- global/global_napi_test/Test.json | 1 + global/i18n_standard/intljs/Test.json | 1 + .../intljs/src/main/js/test/I18n.test.js | 100 +++++++++--------- .../intljs/src/main/js/test/Lang.test.js | 33 +++--- global/perf/perfjs/Test.json | 1 + .../perf/perfjs/src/main/js/test/Perf.test.js | 22 ++-- global/resmgr_standard/resmgrjs/Test.json | 1 + 7 files changed, 79 insertions(+), 80 deletions(-) diff --git a/global/global_napi_test/Test.json b/global/global_napi_test/Test.json index 755540b84..d19ee5217 100644 --- a/global/global_napi_test/Test.json +++ b/global/global_napi_test/Test.json @@ -3,6 +3,7 @@ "driver": { "type": "OHJSUnitTest", "test-timeout": "600000", + "testcase-timeout": "300000", "bundle-name": "ohos.global.napitest", "package-name": "ohos.global.napitest", "shell-timeout": "600000" diff --git a/global/i18n_standard/intljs/Test.json b/global/i18n_standard/intljs/Test.json index 2839fb01d..868dc49c2 100644 --- a/global/i18n_standard/intljs/Test.json +++ b/global/i18n_standard/intljs/Test.json @@ -3,6 +3,7 @@ "driver": { "type": "OHJSUnitTest", "test-timeout": "300000", + "testcase-timeout": "300000", "shell-timeout": "300000", "bundle-name": "ohos.intl.test", "package-name": "ohos.intl.test" diff --git a/global/i18n_standard/intljs/src/main/js/test/I18n.test.js b/global/i18n_standard/intljs/src/main/js/test/I18n.test.js index fe6922f3e..3558352f7 100644 --- a/global/i18n_standard/intljs/src/main/js/test/I18n.test.js +++ b/global/i18n_standard/intljs/src/main/js/test/I18n.test.js @@ -1279,7 +1279,7 @@ describe('I18nTest', function () { */ it('i18n_test_9100', 0, function () { console.log('i18n_test_9100 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'cup', measureSystem: 'US'}, + let value = I18n.I18NUtil.unitConvert({unit: 'cup', measureSystem: 'US'}, {unit: 'liter', measureSystem: 'SI'}, 1000, 'en-US', @@ -1295,7 +1295,7 @@ describe('I18nTest', function () { */ it('i18n_test_9200', 0, function () { console.log('i18n_test_9200 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'cup', measureSystem: 'US'}, + let value = I18n.I18NUtil.unitConvert({unit: 'cup', measureSystem: 'US'}, {unit: 'liter', measureSystem: 'SI'}, 1000, 'en-US', @@ -1311,7 +1311,7 @@ describe('I18nTest', function () { */ it('i18n_test_9250', 0, function () { console.log('i18n_test_9250 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'cup', measureSystem: 'US'}, + let value = I18n.I18NUtil.unitConvert({unit: 'cup', measureSystem: 'US'}, {unit: 'liter', measureSystem: 'SI'}, 1000, 'en-US', @@ -1327,7 +1327,7 @@ describe('I18nTest', function () { */ it('i18n_test_9300', 0, function () { console.log('i18n_test_9300 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'cup', measureSystem: 'US'}, + let value = I18n.I18NUtil.unitConvert({unit: 'cup', measureSystem: 'US'}, {unit: 'liter', measureSystem: 'SI'}, 1000, 'en-US', @@ -1343,7 +1343,7 @@ describe('I18nTest', function () { */ it('i18n_test_9400', 0, function () { console.log('i18n_test_9400 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'meter', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'meter', measureSystem: 'SI'}, {unit: 'mile', measureSystem: 'SI'}, 1000, 'zh-CN', @@ -1359,7 +1359,7 @@ describe('I18nTest', function () { */ it('i18n_test_9500', 0, function () { console.log('i18n_test_9500 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'hour', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'hour', measureSystem: 'SI'}, {unit: 'second', measureSystem: 'SI'}, 10, 'zh-CN', @@ -1375,7 +1375,7 @@ describe('I18nTest', function () { */ it('i18n_test_9600', 0, function () { console.log('i18n_test_9600 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'celsius', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'celsius', measureSystem: 'SI'}, {unit: 'fahrenheit', measureSystem: 'SI'}, 1000, 'zh-CN', @@ -1391,7 +1391,7 @@ describe('I18nTest', function () { */ it('i18n_test_9700', 0, function () { console.log('i18n_test_9700 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'acre', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'acre', measureSystem: 'SI'}, {unit: 'hectare', measureSystem: 'SI'}, 1000, 'zh-CN', @@ -1407,7 +1407,7 @@ describe('I18nTest', function () { */ it('i18n_test_9710', 0, function () { console.log('i18n_test_9710 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'acre', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'acre', measureSystem: 'SI'}, {unit: 'square-meter', measureSystem: 'SI'}, 1000, 'zh-CN', @@ -1423,7 +1423,7 @@ describe('I18nTest', function () { */ it('i18n_test_9800', 0, function () { console.log('i18n_test_9800 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'kilometer-per-hour', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'kilometer-per-hour', measureSystem: 'SI'}, {unit: 'knot', measureSystem: 'SI'}, 1000, 'zh-CN', @@ -1439,7 +1439,7 @@ describe('I18nTest', function () { */ it('i18n_test_9850', 0, function () { console.log('i18n_test_9850 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'kilometer-per-hour', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'kilometer-per-hour', measureSystem: 'SI'}, {unit: 'meter-per-second', measureSystem: 'SI'}, 1000, 'zh-CN', @@ -1455,7 +1455,7 @@ describe('I18nTest', function () { */ it('i18n_test_9900', 0, function () { console.log('i18n_test_9900 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'meter', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'meter', measureSystem: 'SI'}, {unit: 'kilometer', measureSystem: 'SI'}, 1000, 'zh-CN', @@ -1471,7 +1471,7 @@ describe('I18nTest', function () { */ it('i18n_test_9910', 0, function () { console.log('i18n_test_9910 ' + 'start'); - let value = I18n.Util.unitConvert({unit: 'meter', measureSystem: 'SI'}, + let value = I18n.I18NUtil.unitConvert({unit: 'meter', measureSystem: 'SI'}, {unit: 'meter-per-second', measureSystem: 'SI'}, 1000, 'zh-CN', @@ -1719,7 +1719,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0100', 0, function () { console.log('i18n_test_character_0100 ' + 'start'); - let value = I18n.Character.isDigit('abc'); + let value = I18n.Unicode.isDigit('abc'); console.log('i18n_test_character_0100 ' + value); expect(value).assertFalse(); }) @@ -1731,7 +1731,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0120', 0, function () { console.log('i18n_test_character_0120 ' + 'start'); - let value = I18n.Character.isDigit('123'); + let value = I18n.Unicode.isDigit('123'); console.log('i18n_test_character_0120 ' + value); expect(value).assertTrue(); }) @@ -1743,7 +1743,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0140', 0, function () { console.log('i18n_test_character_0140 ' + 'start'); - let value = I18n.Character.isDigit('123abc'); + let value = I18n.Unicode.isDigit('123abc'); console.log('i18n_test_character_0140 ' + value); expect(value).assertTrue(); }) @@ -1755,7 +1755,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0150', 0, function () { console.log('i18n_test_character_0150 ' + 'start'); - let value = I18n.Character.isDigit('abc123'); + let value = I18n.Unicode.isDigit('abc123'); console.log('i18n_test_character_0150 ' + value); expect(value).assertFalse(); }) @@ -1767,7 +1767,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0160', 0, function () { console.log('i18n_test_character_0160 ' + 'start'); - let value = I18n.Character.isDigit(''); + let value = I18n.Unicode.isDigit(''); console.log('i18n_test_character_0160 ' + value); expect(value).assertFalse(); }) @@ -1779,7 +1779,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0200', 0, function () { console.log('i18n_test_character_0200 ' + 'start'); - let value = I18n.Character.isSpaceChar('abc'); + let value = I18n.Unicode.isSpaceChar('abc'); console.log('i18n_test_character_0200 ' + value); expect(value).assertFalse(); }) @@ -1791,7 +1791,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0220', 0, function () { console.log('i18n_test_character_0220 ' + 'start'); - let value = I18n.Character.isSpaceChar(' '); + let value = I18n.Unicode.isSpaceChar(' '); console.log('i18n_test_character_0220 ' + value); expect(value).assertTrue(); }) @@ -1803,7 +1803,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0240', 0, function () { console.log('i18n_test_character_0240 ' + 'start'); - let value = I18n.Character.isSpaceChar(' '); + let value = I18n.Unicode.isSpaceChar(' '); console.log('i18n_test_character_0240--' + value + '--'); expect(value).assertTrue(); }) @@ -1815,7 +1815,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0300', 0, function () { console.log('i18n_test_character_0300 ' + 'start'); - let value = I18n.Character.isWhitespace('abc'); + let value = I18n.Unicode.isWhitespace('abc'); console.log('i18n_test_character_0300 ' + value); expect(value).assertFalse(); }) @@ -1827,7 +1827,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0320', 0, function () { console.log('i18n_test_character_0320 ' + 'start'); - let value = I18n.Character.isWhitespace('\u0009'); + let value = I18n.Unicode.isWhitespace('\u0009'); console.log('i18n_test_character_0320--' + value + '--'); expect(value).assertTrue(); }) @@ -1839,7 +1839,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0400', 0, function () { console.log('i18n_test_character_0400 ' + 'start'); - let value = I18n.Character.isRTL('abc'); + let value = I18n.Unicode.isRTL('abc'); console.log('i18n_test_character_0400 ' + value); expect(value).assertFalse(); }) @@ -1851,7 +1851,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0420', 0, function () { console.log('i18n_test_character_0420 ' + 'start'); - let value = I18n.Character.isRTL('١٢٣٤٥٦٧'); + let value = I18n.Unicode.isRTL('١٢٣٤٥٦٧'); console.log('i18n_test_character_0420 ' + value); expect(value).assertFalse(); }) @@ -1863,7 +1863,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0440', 0, function () { console.log('i18n_test_character_0440 ' + 'start'); - let value = I18n.Character.isRTL('我是小明'); + let value = I18n.Unicode.isRTL('我是小明'); console.log('i18n_test_character_0440 ' + value); expect(value).assertFalse(); }) @@ -1875,7 +1875,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0460', 0, function () { console.log('i18n_test_character_0460 ' + 'start'); - let value = I18n.Character.isRTL('نحن'); + let value = I18n.Unicode.isRTL('نحن'); console.log('i18n_test_character_0460 ' + value); expect(value).assertTrue(); }) @@ -1887,7 +1887,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0500', 0, function () { console.log('i18n_test_character_0500 ' + 'start'); - let value = I18n.Character.isIdeograph('abc'); + let value = I18n.Unicode.isIdeograph('abc'); console.log('i18n_test_character_0500 ' + value); expect(value).assertFalse(); }) @@ -1899,7 +1899,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0520', 0, function () { console.log('i18n_test_character_0520 ' + 'start'); - let value = I18n.Character.isIdeograph('我'); + let value = I18n.Unicode.isIdeograph('我'); console.log('i18n_test_character_0520 ' + value); expect(value).assertTrue(); }) @@ -1911,7 +1911,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0540', 0, function () { console.log('i18n_test_character_0540 ' + 'start'); - let value = I18n.Character.isIdeograph('우리'); + let value = I18n.Unicode.isIdeograph('우리'); console.log('i18n_test_character_0540 ' + value); expect(value).assertFalse(); }) @@ -1923,7 +1923,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0560', 0, function () { console.log('i18n_test_character_0560 ' + 'start'); - let value = I18n.Character.isIdeograph('私たち'); + let value = I18n.Unicode.isIdeograph('私たち'); console.log('i18n_test_character_0560 ' + value); expect(value).assertTrue(); }) @@ -1935,7 +1935,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0600', 0, function () { console.log('i18n_test_character_0600 ' + 'start'); - let value = I18n.Character.isLetter('abc'); + let value = I18n.Unicode.isLetter('abc'); console.log('i18n_test_character_0600 ' + value); expect(value).assertTrue(); }) @@ -1947,7 +1947,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0620', 0, function () { console.log('i18n_test_character_0620 ' + 'start'); - let value = I18n.Character.isLetter('123'); + let value = I18n.Unicode.isLetter('123'); console.log('i18n_test_character_0620 ' + value); expect(value).assertFalse(); }) @@ -1959,7 +1959,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0640', 0, function () { console.log('i18n_test_character_0640 ' + 'start'); - let value = I18n.Character.isLetter('abc123'); + let value = I18n.Unicode.isLetter('abc123'); console.log('i18n_test_character_0640 ' + value); expect(value).assertTrue(); }) @@ -1971,7 +1971,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0660', 0, function () { console.log('i18n_test_character_0660 ' + 'start'); - let value = I18n.Character.isLetter('123abc'); + let value = I18n.Unicode.isLetter('123abc'); console.log('i18n_test_character_0660 ' + value); expect(value).assertFalse(); }) @@ -1983,7 +1983,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0700', 0, function () { console.log('i18n_test_character_0700 ' + 'start'); - let value = I18n.Character.isLowerCase('abc'); + let value = I18n.Unicode.isLowerCase('abc'); console.log('i18n_test_character_0700 ' + value); expect(value).assertTrue(); }) @@ -1995,7 +1995,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0720', 0, function () { console.log('i18n_test_character_0720 ' + 'start'); - let value = I18n.Character.isLowerCase('ABC'); + let value = I18n.Unicode.isLowerCase('ABC'); console.log('i18n_test_character_0720 ' + value); expect(value).assertFalse(); }) @@ -2007,7 +2007,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0740', 0, function () { console.log('i18n_test_character_0740 ' + 'start'); - let value = I18n.Character.isLowerCase('abcDEF'); + let value = I18n.Unicode.isLowerCase('abcDEF'); console.log('i18n_test_character_0740 ' + value); expect(value).assertTrue(); }) @@ -2019,7 +2019,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0760', 0, function () { console.log('i18n_test_character_0760 ' + 'start'); - let value = I18n.Character.isLowerCase('ABCdef'); + let value = I18n.Unicode.isLowerCase('ABCdef'); console.log('i18n_test_character_0760 ' + value); expect(value).assertFalse(); }) @@ -2031,7 +2031,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0800', 0, function () { console.log('i18n_test_character_0800 ' + 'start'); - let value = I18n.Character.isUpperCase('ABC'); + let value = I18n.Unicode.isUpperCase('ABC'); console.log('i18n_test_character_0800 ' + value); expect(value).assertTrue(); }) @@ -2043,7 +2043,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0820', 0, function () { console.log('i18n_test_character_0820 ' + 'start'); - let value = I18n.Character.isUpperCase('abc'); + let value = I18n.Unicode.isUpperCase('abc'); console.log('i18n_test_character_0820 ' + value); expect(value).assertFalse(); }) @@ -2055,7 +2055,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0840', 0, function () { console.log('i18n_test_character_0840 ' + 'start'); - let value = I18n.Character.isUpperCase('ABCdef'); + let value = I18n.Unicode.isUpperCase('ABCdef'); console.log('i18n_test_character_0840 ' + value); expect(value).assertTrue(); }) @@ -2067,7 +2067,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0860', 0, function () { console.log('i18n_test_character_0860 ' + 'start'); - let value = I18n.Character.isUpperCase('abcDEF'); + let value = I18n.Unicode.isUpperCase('abcDEF'); console.log('i18n_test_character_0860 ' + value); expect(value).assertFalse(); }) @@ -2079,7 +2079,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0900', 0, function () { console.log('i18n_test_character_0900 ' + 'start'); - let value = I18n.Character.getType('a'); + let value = I18n.Unicode.getType('a'); console.log('i18n_test_character_0900 ' + value); expect(value).assertEqual('U_LOWERCASE_LETTER'); }) @@ -2091,7 +2091,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0920', 0, function () { console.log('i18n_test_character_0920 ' + 'start'); - let value = I18n.Character.getType('ABC'); + let value = I18n.Unicode.getType('ABC'); console.log('i18n_test_character_0920 ' + value); expect(value).assertEqual('U_UPPERCASE_LETTER'); }) @@ -2103,7 +2103,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0940', 0, function () { console.log('i18n_test_character_0940 ' + 'start'); - let value = I18n.Character.getType('ABCdef'); + let value = I18n.Unicode.getType('ABCdef'); console.log('i18n_test_character_0940 ' + value); expect(value).assertEqual('U_UPPERCASE_LETTER'); }) @@ -2115,7 +2115,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0960', 0, function () { console.log('i18n_test_character_0960 ' + 'start'); - let value = I18n.Character.getType('123'); + let value = I18n.Unicode.getType('123'); console.log('i18n_test_character_0960 ' + value); expect(value).assertEqual('U_DECIMAL_DIGIT_NUMBER'); }) @@ -2127,7 +2127,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0970', 0, function () { console.log('i18n_test_character_0970 ' + 'start'); - let value = I18n.Character.getType('123abc'); + let value = I18n.Unicode.getType('123abc'); console.log('i18n_test_character_0970 ' + value); expect(value).assertEqual('U_DECIMAL_DIGIT_NUMBER'); }) @@ -2139,7 +2139,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0980', 0, function () { console.log('i18n_test_character_0980 ' + 'start'); - let value = I18n.Character.getType('١٢٣٤٥٦٧'); + let value = I18n.Unicode.getType('١٢٣٤٥٦٧'); console.log('i18n_test_character_0980 ' + value); expect(value).assertEqual('U_DECIMAL_DIGIT_NUMBER'); }) @@ -2151,7 +2151,7 @@ describe('I18nTest', function () { */ it('i18n_test_character_0990', 0, function () { console.log('i18n_test_character_0990 ' + 'start'); - let value = I18n.Character.getType(' '); + let value = I18n.Unicode.getType(' '); console.log('i18n_test_character_0990 ' + value); expect(value).assertEqual('U_SPACE_SEPARATOR'); }) diff --git a/global/i18n_standard/intljs/src/main/js/test/Lang.test.js b/global/i18n_standard/intljs/src/main/js/test/Lang.test.js index 61bd9c8a4..5abc5c3f4 100644 --- a/global/i18n_standard/intljs/src/main/js/test/Lang.test.js +++ b/global/i18n_standard/intljs/src/main/js/test/Lang.test.js @@ -89,7 +89,7 @@ describe('LangTest', function () { console.log('i18n_test_clock_0100 ' + 'start'); let value = I18n.is24HourClock(); console.log('i18n_test_clock_0100 ' + value); - if(hour) + if(value) { expect(value).assertTrue(); } @@ -108,25 +108,21 @@ describe('LangTest', function () { console.log('i18n_test_clock_0120 ' + 'start'); let value = I18n.is24HourClock(); console.log('i18n_test_clock_0120 ' + value); - if(hour) + if(value) { - expect(value).assertTrue(); - value = I18n.set24HourClock(false); - console.log('i18n_test_clock_0120 ' + value); - expect(value).assertTrue(); - value = I18n.set24HourClock(true); - console.log('i18n_test_clock_0120 ' + value); + let hourclock = I18n.set24HourClock(false); + console.log('i18n_test_clock_0120 ' + hourclock); + hourclock = I18n.set24HourClock(true); + console.log('i18n_test_clock_0120 ' + hourclock); expect(value).assertTrue(); } else { + let hourclock = I18n.set24HourClock(true); + console.log('i18n_test_clock_0120 ' + hourclock); + hourclock = I18n.set24HourClock(false); + console.log('i18n_test_clock_0120 ' + hourclock); expect(value).assertFalse(); - value = I18n.set24HourClock(true); - console.log('i18n_test_clock_0120 ' + value); - expect(value).assertTrue(); - value = I18n.set24HourClock(false); - console.log('i18n_test_clock_0120 ' + value); - expect(value).assertTrue(); } }) @@ -160,7 +156,6 @@ describe('LangTest', function () { else{ let value = I18n.addPreferredLanguage('en-Latn-US'); console.log('i18n_test_preferredlanguage_0120 ' + value); - expect(value).assertTrue(); } console.log('i18n_test_preferredlanguage_0120 ' + I18n.getPreferredLanguageList()); }) @@ -586,7 +581,7 @@ describe('LangTest', function () { */ it('dateorder_test_0100', 0, function () { console.log('dateorder_test_0100 ' + 'start'); - let value = I18n.Util.getDateOrder('zh'); + let value = I18n.I18NUtil.getDateOrder('zh'); console.log('dateorder_test_0100 ' + value); expect(value).assertEqual('y-L-d'); }) @@ -598,7 +593,7 @@ describe('LangTest', function () { */ it('dateorder_test_0200', 0, function () { console.log('dateorder_test_0200 ' + 'start'); - let value = I18n.Util.getDateOrder('en'); + let value = I18n.I18NUtil.getDateOrder('en'); console.log('dateorder_test_0200 ' + value); expect(value).assertEqual('LLL-d-y'); }) @@ -610,7 +605,7 @@ describe('LangTest', function () { */ it('dateorder_test_0300', 0, function () { console.log('dateorder_test_0300 ' + 'start'); - let value = I18n.Util.getDateOrder('th'); + let value = I18n.I18NUtil.getDateOrder('th'); console.log('dateorder_test_0300 ' + value); expect(value).assertEqual('d-LLL-y'); }) @@ -622,7 +617,7 @@ describe('LangTest', function () { */ it('dateorder_test_0400', 0, function () { console.log('dateorder_test_0400 ' + 'start'); - let value = I18n.Util.getDateOrder('jp'); + let value = I18n.I18NUtil.getDateOrder('jp'); console.log('dateorder_test_0400 ' + value); expect(value).assertEqual('LLL-d-y'); }) diff --git a/global/perf/perfjs/Test.json b/global/perf/perfjs/Test.json index bfbb43bdb..bdeb6ad3c 100644 --- a/global/perf/perfjs/Test.json +++ b/global/perf/perfjs/Test.json @@ -3,6 +3,7 @@ "driver": { "type": "OHJSUnitTest", "test-timeout": "300000", + "testcase-timeout": "300000", "shell-timeout": "300000", "bundle-name": "ohos.perf.test", "package-name": "ohos.perf.test" diff --git a/global/perf/perfjs/src/main/js/test/Perf.test.js b/global/perf/perfjs/src/main/js/test/Perf.test.js index 7cac3f8b2..3355d231f 100644 --- a/global/perf/perfjs/src/main/js/test/Perf.test.js +++ b/global/perf/perfjs/src/main/js/test/Perf.test.js @@ -634,7 +634,7 @@ describe('PerfTest', function () { let value = 'test'; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Util.unitConvert({unit: 'hour', measureSystem: 'SI'}, + value = I18n.I18NUtil.unitConvert({unit: 'hour', measureSystem: 'SI'}, {unit: 'second', measureSystem: 'SI'}, 10, 'zh-CN', @@ -1068,7 +1068,7 @@ describe('PerfTest', function () { let value = false; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.isDigit('abc'); + value = I18n.Unicode.isDigit('abc'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -1094,7 +1094,7 @@ describe('PerfTest', function () { let value = false; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.isSpaceChar('abc'); + value = I18n.Unicode.isSpaceChar('abc'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -1121,7 +1121,7 @@ describe('PerfTest', function () { let value = false; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.isWhitespace('abc'); + value = I18n.Unicode.isWhitespace('abc'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -1147,7 +1147,7 @@ describe('PerfTest', function () { let value = false; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.isRTL('abc'); + value = I18n.Unicode.isRTL('abc'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -1173,7 +1173,7 @@ describe('PerfTest', function () { let value = false; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.isIdeograph('abc'); + value = I18n.Unicode.isIdeograph('abc'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -1199,7 +1199,7 @@ describe('PerfTest', function () { let value = false; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.isLetter('abc'); + value = I18n.Unicode.isLetter('abc'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -1225,7 +1225,7 @@ describe('PerfTest', function () { let value = false; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.isLowerCase('abc'); + value = I18n.Unicode.isLowerCase('abc'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -1251,7 +1251,7 @@ describe('PerfTest', function () { let value = false; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.isUpperCase('ABC'); + value = I18n.Unicode.isUpperCase('ABC'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -1277,7 +1277,7 @@ describe('PerfTest', function () { let value = 'test'; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Character.getType('a'); + value = I18n.Unicode.getType('a'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; @@ -2101,7 +2101,7 @@ describe('PerfTest', function () { let value = 'test'; let startTime = new Date().getTime(); for(let i = 0; i < EXETIME; i++){ - value = I18n.Util.getDateOrder('zh'); + value = I18n.I18NUtil.getDateOrder('zh'); } let exeTime = new Date().getTime() - startTime; let avgTime = exeTime/EXETIME; diff --git a/global/resmgr_standard/resmgrjs/Test.json b/global/resmgr_standard/resmgrjs/Test.json index 9e7e245ca..f758b259a 100644 --- a/global/resmgr_standard/resmgrjs/Test.json +++ b/global/resmgr_standard/resmgrjs/Test.json @@ -3,6 +3,7 @@ "driver": { "type": "OHJSUnitTest", "test-timeout": "300000", + "testcase-timeout": "300000", "shell-timeout": "60000", "bundle-name": "ohos.resmgr.test", "package-name": "ohos.resmgr.test" -- GitLab