提交 0b63da33 编写于 作者: Y y00314596

add by yangqing3@huawei.com

Signed-off-by: Ny00314596 <yangqing3@huawei.com>
上级 917a5b2a
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"driver": { "driver": {
"type": "OHJSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "600000", "test-timeout": "600000",
"testcase-timeout": "300000",
"bundle-name": "ohos.global.napitest", "bundle-name": "ohos.global.napitest",
"package-name": "ohos.global.napitest", "package-name": "ohos.global.napitest",
"shell-timeout": "600000" "shell-timeout": "600000"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"driver": { "driver": {
"type": "OHJSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "300000", "test-timeout": "300000",
"testcase-timeout": "300000",
"shell-timeout": "300000", "shell-timeout": "300000",
"bundle-name": "ohos.intl.test", "bundle-name": "ohos.intl.test",
"package-name": "ohos.intl.test" "package-name": "ohos.intl.test"
......
...@@ -89,7 +89,7 @@ describe('LangTest', function () { ...@@ -89,7 +89,7 @@ describe('LangTest', function () {
console.log('i18n_test_clock_0100 ' + 'start'); console.log('i18n_test_clock_0100 ' + 'start');
let value = I18n.is24HourClock(); let value = I18n.is24HourClock();
console.log('i18n_test_clock_0100 ' + value); console.log('i18n_test_clock_0100 ' + value);
if(hour) if(value)
{ {
expect(value).assertTrue(); expect(value).assertTrue();
} }
...@@ -108,25 +108,21 @@ describe('LangTest', function () { ...@@ -108,25 +108,21 @@ describe('LangTest', function () {
console.log('i18n_test_clock_0120 ' + 'start'); console.log('i18n_test_clock_0120 ' + 'start');
let value = I18n.is24HourClock(); let value = I18n.is24HourClock();
console.log('i18n_test_clock_0120 ' + value); console.log('i18n_test_clock_0120 ' + value);
if(hour) if(value)
{ {
expect(value).assertTrue(); let hourclock = I18n.set24HourClock(false);
value = I18n.set24HourClock(false); console.log('i18n_test_clock_0120 ' + hourclock);
console.log('i18n_test_clock_0120 ' + value); hourclock = I18n.set24HourClock(true);
expect(value).assertTrue(); console.log('i18n_test_clock_0120 ' + hourclock);
value = I18n.set24HourClock(true);
console.log('i18n_test_clock_0120 ' + value);
expect(value).assertTrue(); expect(value).assertTrue();
} }
else 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(); 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 () { ...@@ -160,7 +156,6 @@ describe('LangTest', function () {
else{ else{
let value = I18n.addPreferredLanguage('en-Latn-US'); let value = I18n.addPreferredLanguage('en-Latn-US');
console.log('i18n_test_preferredlanguage_0120 ' + value); console.log('i18n_test_preferredlanguage_0120 ' + value);
expect(value).assertTrue();
} }
console.log('i18n_test_preferredlanguage_0120 ' + I18n.getPreferredLanguageList()); console.log('i18n_test_preferredlanguage_0120 ' + I18n.getPreferredLanguageList());
}) })
...@@ -586,7 +581,7 @@ describe('LangTest', function () { ...@@ -586,7 +581,7 @@ describe('LangTest', function () {
*/ */
it('dateorder_test_0100', 0, function () { it('dateorder_test_0100', 0, function () {
console.log('dateorder_test_0100 ' + 'start'); console.log('dateorder_test_0100 ' + 'start');
let value = I18n.Util.getDateOrder('zh'); let value = I18n.I18NUtil.getDateOrder('zh');
console.log('dateorder_test_0100 ' + value); console.log('dateorder_test_0100 ' + value);
expect(value).assertEqual('y-L-d'); expect(value).assertEqual('y-L-d');
}) })
...@@ -598,7 +593,7 @@ describe('LangTest', function () { ...@@ -598,7 +593,7 @@ describe('LangTest', function () {
*/ */
it('dateorder_test_0200', 0, function () { it('dateorder_test_0200', 0, function () {
console.log('dateorder_test_0200 ' + 'start'); console.log('dateorder_test_0200 ' + 'start');
let value = I18n.Util.getDateOrder('en'); let value = I18n.I18NUtil.getDateOrder('en');
console.log('dateorder_test_0200 ' + value); console.log('dateorder_test_0200 ' + value);
expect(value).assertEqual('LLL-d-y'); expect(value).assertEqual('LLL-d-y');
}) })
...@@ -610,7 +605,7 @@ describe('LangTest', function () { ...@@ -610,7 +605,7 @@ describe('LangTest', function () {
*/ */
it('dateorder_test_0300', 0, function () { it('dateorder_test_0300', 0, function () {
console.log('dateorder_test_0300 ' + 'start'); console.log('dateorder_test_0300 ' + 'start');
let value = I18n.Util.getDateOrder('th'); let value = I18n.I18NUtil.getDateOrder('th');
console.log('dateorder_test_0300 ' + value); console.log('dateorder_test_0300 ' + value);
expect(value).assertEqual('d-LLL-y'); expect(value).assertEqual('d-LLL-y');
}) })
...@@ -622,7 +617,7 @@ describe('LangTest', function () { ...@@ -622,7 +617,7 @@ describe('LangTest', function () {
*/ */
it('dateorder_test_0400', 0, function () { it('dateorder_test_0400', 0, function () {
console.log('dateorder_test_0400 ' + 'start'); console.log('dateorder_test_0400 ' + 'start');
let value = I18n.Util.getDateOrder('jp'); let value = I18n.I18NUtil.getDateOrder('jp');
console.log('dateorder_test_0400 ' + value); console.log('dateorder_test_0400 ' + value);
expect(value).assertEqual('LLL-d-y'); expect(value).assertEqual('LLL-d-y');
}) })
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"driver": { "driver": {
"type": "OHJSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "300000", "test-timeout": "300000",
"testcase-timeout": "300000",
"shell-timeout": "300000", "shell-timeout": "300000",
"bundle-name": "ohos.perf.test", "bundle-name": "ohos.perf.test",
"package-name": "ohos.perf.test" "package-name": "ohos.perf.test"
......
...@@ -634,7 +634,7 @@ describe('PerfTest', function () { ...@@ -634,7 +634,7 @@ describe('PerfTest', function () {
let value = 'test'; let value = 'test';
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ 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'}, {unit: 'second', measureSystem: 'SI'},
10, 10,
'zh-CN', 'zh-CN',
...@@ -1068,7 +1068,7 @@ describe('PerfTest', function () { ...@@ -1068,7 +1068,7 @@ describe('PerfTest', function () {
let value = false; let value = false;
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.isDigit('abc'); value = I18n.Unicode.isDigit('abc');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -1094,7 +1094,7 @@ describe('PerfTest', function () { ...@@ -1094,7 +1094,7 @@ describe('PerfTest', function () {
let value = false; let value = false;
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.isSpaceChar('abc'); value = I18n.Unicode.isSpaceChar('abc');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -1121,7 +1121,7 @@ describe('PerfTest', function () { ...@@ -1121,7 +1121,7 @@ describe('PerfTest', function () {
let value = false; let value = false;
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.isWhitespace('abc'); value = I18n.Unicode.isWhitespace('abc');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -1147,7 +1147,7 @@ describe('PerfTest', function () { ...@@ -1147,7 +1147,7 @@ describe('PerfTest', function () {
let value = false; let value = false;
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.isRTL('abc'); value = I18n.Unicode.isRTL('abc');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -1173,7 +1173,7 @@ describe('PerfTest', function () { ...@@ -1173,7 +1173,7 @@ describe('PerfTest', function () {
let value = false; let value = false;
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.isIdeograph('abc'); value = I18n.Unicode.isIdeograph('abc');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -1199,7 +1199,7 @@ describe('PerfTest', function () { ...@@ -1199,7 +1199,7 @@ describe('PerfTest', function () {
let value = false; let value = false;
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.isLetter('abc'); value = I18n.Unicode.isLetter('abc');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -1225,7 +1225,7 @@ describe('PerfTest', function () { ...@@ -1225,7 +1225,7 @@ describe('PerfTest', function () {
let value = false; let value = false;
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.isLowerCase('abc'); value = I18n.Unicode.isLowerCase('abc');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -1251,7 +1251,7 @@ describe('PerfTest', function () { ...@@ -1251,7 +1251,7 @@ describe('PerfTest', function () {
let value = false; let value = false;
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.isUpperCase('ABC'); value = I18n.Unicode.isUpperCase('ABC');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -1277,7 +1277,7 @@ describe('PerfTest', function () { ...@@ -1277,7 +1277,7 @@ describe('PerfTest', function () {
let value = 'test'; let value = 'test';
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Character.getType('a'); value = I18n.Unicode.getType('a');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
...@@ -2101,7 +2101,7 @@ describe('PerfTest', function () { ...@@ -2101,7 +2101,7 @@ describe('PerfTest', function () {
let value = 'test'; let value = 'test';
let startTime = new Date().getTime(); let startTime = new Date().getTime();
for(let i = 0; i < EXETIME; i++){ for(let i = 0; i < EXETIME; i++){
value = I18n.Util.getDateOrder('zh'); value = I18n.I18NUtil.getDateOrder('zh');
} }
let exeTime = new Date().getTime() - startTime; let exeTime = new Date().getTime() - startTime;
let avgTime = exeTime/EXETIME; let avgTime = exeTime/EXETIME;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"driver": { "driver": {
"type": "OHJSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "300000", "test-timeout": "300000",
"testcase-timeout": "300000",
"shell-timeout": "60000", "shell-timeout": "60000",
"bundle-name": "ohos.resmgr.test", "bundle-name": "ohos.resmgr.test",
"package-name": "ohos.resmgr.test" "package-name": "ohos.resmgr.test"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册