Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0b63da33
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0b63da33
编写于
9月 14, 2022
作者:
Y
y00314596
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add by yangqing3@huawei.com
Signed-off-by:
N
y00314596
<
yangqing3@huawei.com
>
上级
917a5b2a
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
79 addition
and
80 deletion
+79
-80
global/global_napi_test/Test.json
global/global_napi_test/Test.json
+1
-0
global/i18n_standard/intljs/Test.json
global/i18n_standard/intljs/Test.json
+1
-0
global/i18n_standard/intljs/src/main/js/test/I18n.test.js
global/i18n_standard/intljs/src/main/js/test/I18n.test.js
+50
-50
global/i18n_standard/intljs/src/main/js/test/Lang.test.js
global/i18n_standard/intljs/src/main/js/test/Lang.test.js
+14
-19
global/perf/perfjs/Test.json
global/perf/perfjs/Test.json
+1
-0
global/perf/perfjs/src/main/js/test/Perf.test.js
global/perf/perfjs/src/main/js/test/Perf.test.js
+11
-11
global/resmgr_standard/resmgrjs/Test.json
global/resmgr_standard/resmgrjs/Test.json
+1
-0
未找到文件。
global/global_napi_test/Test.json
浏览文件 @
0b63da33
...
@@ -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"
...
...
global/i18n_standard/intljs/Test.json
浏览文件 @
0b63da33
...
@@ -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"
...
...
global/i18n_standard/intljs/src/main/js/test/I18n.test.js
浏览文件 @
0b63da33
此差异已折叠。
点击以展开。
global/i18n_standard/intljs/src/main/js/test/Lang.test.js
浏览文件 @
0b63da33
...
@@ -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
.
I18N
Util
.
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
.
I18N
Util
.
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
.
I18N
Util
.
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
.
I18N
Util
.
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
'
);
})
})
...
...
global/perf/perfjs/Test.json
浏览文件 @
0b63da33
...
@@ -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"
...
...
global/perf/perfjs/src/main/js/test/Perf.test.js
浏览文件 @
0b63da33
...
@@ -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
.
I18N
Util
.
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
.
I18N
Util
.
getDateOrder
(
'
zh
'
);
}
}
let
exeTime
=
new
Date
().
getTime
()
-
startTime
;
let
exeTime
=
new
Date
().
getTime
()
-
startTime
;
let
avgTime
=
exeTime
/
EXETIME
;
let
avgTime
=
exeTime
/
EXETIME
;
...
...
global/resmgr_standard/resmgrjs/Test.json
浏览文件 @
0b63da33
...
@@ -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"
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
81993fa3
·
9月 20, 2022
mentioned in commit
81993fa3
mentioned in commit 81993fa3da672c1591634de72c2af63fd4cd512d
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录