Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
93fcb02d
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看板
未验证
提交
93fcb02d
编写于
2月 24, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 24, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2043 Modify xts of process and util
Merge pull request !2043 from 史凯/master
上级
f417bb2b
41b36d27
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
85 deletion
+46
-85
compileruntime/process_lib_standard/src/main/js/test/Process.test.js
...ime/process_lib_standard/src/main/js/test/Process.test.js
+39
-39
compileruntime/util_lib_standard/src/main/js/test/ExampleJsunit.test.js
.../util_lib_standard/src/main/js/test/ExampleJsunit.test.js
+0
-24
compileruntime/util_lib_standard/src/main/js/test/List.test.js
...leruntime/util_lib_standard/src/main/js/test/List.test.js
+1
-16
compileruntime/util_lib_standard/src/main/js/test/util.test.js
...leruntime/util_lib_standard/src/main/js/test/util.test.js
+6
-6
未找到文件。
compileruntime/process_lib_standard/src/main/js/test/Process.test.js
浏览文件 @
93fcb02d
...
...
@@ -816,7 +816,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetUid004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
){
for
(
var
i
=
0
;
i
<
8
;
i
++
){
var
result
=
process
.
uid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
...
...
@@ -834,7 +834,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetUid005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
2
5
;
i
++
){
for
(
var
i
=
0
;
i
<
5
;
i
++
){
var
result
=
process
.
uid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
...
...
@@ -902,7 +902,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetGid004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
){
for
(
var
i
=
0
;
i
<
6
;
i
++
){
var
result
=
process
.
gid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
...
...
@@ -920,7 +920,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetGid005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
9
;
i
++
){
for
(
var
i
=
0
;
i
<
8
;
i
++
){
var
result
=
process
.
gid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
...
...
@@ -988,7 +988,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetEuid004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
8
;
i
++
){
for
(
var
i
=
0
;
i
<
6
;
i
++
){
var
result
=
process
.
euid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
...
...
@@ -1006,7 +1006,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetEuid005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
15
;
i
++
){
for
(
var
i
=
0
;
i
<
8
;
i
++
){
var
result
=
process
.
euid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
...
...
@@ -1074,7 +1074,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetEgid004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
15
;
i
++
){
for
(
var
i
=
0
;
i
<
6
;
i
++
){
var
result
=
process
.
egid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
...
...
@@ -1092,7 +1092,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetEgid005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
26
;
i
++
){
for
(
var
i
=
0
;
i
<
8
;
i
++
){
var
result
=
process
.
egid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
...
...
@@ -1163,7 +1163,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetGroups004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
18
;
i
++
){
for
(
var
i
=
0
;
i
<
6
;
i
++
){
var
result
=
process
.
groups
if
(
result
!=
null
)
{
var
len
=
result
.
length
...
...
@@ -1182,7 +1182,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetGroups005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
2
8
;
i
++
){
for
(
var
i
=
0
;
i
<
8
;
i
++
){
var
result
=
process
.
groups
if
(
result
!=
null
)
{
var
len
=
result
.
length
...
...
@@ -1447,7 +1447,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testPid004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
6
;
i
++
)
{
var
result
=
process
.
pid
if
(
result
>
0
)
{
...
...
@@ -1464,7 +1464,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testPid005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
2
8
;
i
++
)
for
(
var
i
=
0
;
i
<
8
;
i
++
)
{
var
result
=
process
.
pid
if
(
result
>
0
)
{
...
...
@@ -1529,7 +1529,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testPpid004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
1
6
;
i
++
)
for
(
var
i
=
0
;
i
<
6
;
i
++
)
{
var
result
=
process
.
ppid
if
(
result
>
0
)
{
...
...
@@ -1546,7 +1546,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testPpid005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
2
8
;
i
++
)
for
(
var
i
=
0
;
i
<
8
;
i
++
)
{
var
result
=
process
.
ppid
if
(
result
>
0
)
{
...
...
@@ -1594,7 +1594,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testCwd003
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
cwdir
=
process
.
cwd
()
if
(
cwdir
){
...
...
@@ -1611,7 +1611,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testCwd004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
18
;
i
++
)
for
(
var
i
=
0
;
i
<
6
;
i
++
)
{
var
cwdir
=
process
.
cwd
()
if
(
cwdir
){
...
...
@@ -1628,7 +1628,7 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testCwd005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
29
;
i
++
)
for
(
var
i
=
0
;
i
<
8
;
i
++
)
{
var
cwdir
=
process
.
cwd
()
if
(
cwdir
){
...
...
@@ -1796,7 +1796,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testTid002
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pres
=
process
.
tid
if
(
pres
>
0
)
...
...
@@ -1814,7 +1814,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testTid003
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
1000
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
pres
=
process
.
tid
if
(
pres
>
0
)
...
...
@@ -1844,7 +1844,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testIsisolatedProcess002
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
pres
=
process
.
isIsolatedProcess
()
expect
(
pres
).
assertEqual
(
true
)
...
...
@@ -1858,7 +1858,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testIsisolatedProcess003
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
1000
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pres
=
process
.
isIsolatedProcess
()
expect
(
pres
).
assertEqual
(
true
)
...
...
@@ -1939,7 +1939,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testIs64Bit002
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
isorno
=
process
.
is64Bit
()
expect
(
isorno
).
assertEqual
(
false
)
...
...
@@ -1953,7 +1953,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testIs64Bit003
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
1000
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
isorno
=
process
.
is64Bit
()
expect
(
isorno
).
assertEqual
(
false
)
...
...
@@ -1983,7 +1983,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetuidforname002
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
pres
=
process
.
getUidForName
(
"
12356
"
)
expect
(
pres
).
assertEqual
(
-
1
)
...
...
@@ -1997,7 +1997,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetuidforname003
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
1000
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pres
=
process
.
getUidForName
(
"
12356
"
)
expect
(
pres
).
assertEqual
(
-
1
)
...
...
@@ -2029,7 +2029,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
testGetthreadpriority002
'
,
0
,
function
()
{
var
pres
=
process
.
tid
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
pri
=
process
.
getThreadPriority
(
pres
)
if
(
pri
>
0
)
...
...
@@ -2048,7 +2048,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
testGetthreadpriority003
'
,
0
,
function
()
{
var
pres
=
process
.
tid
for
(
var
i
=
0
;
i
<
1000
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pri
=
process
.
getThreadPriority
(
pres
)
if
(
pri
>
0
)
...
...
@@ -2067,7 +2067,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetstartrealtime001
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
...
...
@@ -2102,7 +2102,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetstartrealtime003
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
100
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
...
...
@@ -2121,7 +2121,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetstartrealtime004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
1000
;
i
++
)
for
(
var
i
=
0
;
i
<
6
;
i
++
)
{
var
pri
=
process
.
getStartRealtime
()
if
(
pri
>
0
)
...
...
@@ -2139,7 +2139,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetpastCpuTime001
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
...
...
@@ -2172,7 +2172,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetpastCpuTime003
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
100
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
...
...
@@ -2190,7 +2190,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetpastCpuTime004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
1000
;
i
++
)
for
(
var
i
=
0
;
i
<
8
;
i
++
)
{
var
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
...
...
@@ -2225,7 +2225,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
testGetSystemConfig002
'
,
0
,
function
()
{
var
_SC_ARG_MAX
=
0
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
pri
=
process
.
getSystemConfig
(
_SC_ARG_MAX
)
if
(
pri
>
0
)
...
...
@@ -2244,7 +2244,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
testGetSystemConfig003
'
,
0
,
function
()
{
var
_SC_ARG_MAX
=
0
for
(
var
i
=
0
;
i
<
100
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pri
=
process
.
getSystemConfig
(
_SC_ARG_MAX
)
if
(
pri
>
0
)
...
...
@@ -2308,7 +2308,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar002
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
var
pri
=
process
.
getEnvironmentVar
(
"
PATH
"
)
if
(
pri
!=
null
)
...
...
@@ -2326,7 +2326,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar003
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
100
;
i
++
)
for
(
var
i
=
0
;
i
<
5
;
i
++
)
{
var
pri
=
process
.
getEnvironmentVar
(
"
PATH
"
)
if
(
pri
!=
null
)
...
...
@@ -2344,7 +2344,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar004
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
10
;
i
++
)
for
(
var
i
=
0
;
i
<
6
;
i
++
)
{
var
pri
=
process
.
getEnvironmentVar
(
"
USER
"
)
if
(
pri
!=
null
)
...
...
@@ -2362,7 +2362,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar005
'
,
0
,
function
()
{
for
(
var
i
=
0
;
i
<
100
;
i
++
)
for
(
var
i
=
0
;
i
<
8
;
i
++
)
{
var
pri
=
process
.
getEnvironmentVar
(
"
USER
"
)
if
(
pri
!=
null
)
...
...
compileruntime/util_lib_standard/src/main/js/test/ExampleJsunit.test.js
已删除
100644 → 0
浏览文件 @
f417bb2b
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
app
from
'
@system.app
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
appInfoTest
'
,
function
()
{
it
(
'
app_info_test_001
'
,
0
,
function
()
{
var
info
=
app
.
getInfo
()
expect
(
info
.
versionCode
).
assertEqual
(
'
1000000
'
)
})
})
\ No newline at end of file
compileruntime/util_lib_standard/src/main/js/test/List.test.js
浏览文件 @
93fcb02d
...
...
@@ -13,19 +13,4 @@
* limitations under the License.
*/
require
(
'
./ExampleJsunit.test.js
'
);
require
(
'
./util.test.js
'
);
// require('./Deque.test.js');
// require('./ArrayList.test.js');
// require('./Queue.test.js');
// require('./Stack.test.js');
// require('./ContainerList.test.js');
// require('./LinkedList.test.js');
// require('./Vector.test.js');
// require('./LightWeightMap.test.js');
// require('./LightWeightSet.test.js');
// require('./HashMap.test.js');
// require('./HashSet.test.js');
// require('./PlainArray.test.js');
// require('./TreeMap.test.js');
// require('./TreeSet.test.js');
require
(
'
./util.test.js
'
);
\ No newline at end of file
compileruntime/util_lib_standard/src/main/js/test/util.test.js
浏览文件 @
93fcb02d
...
...
@@ -124,10 +124,10 @@ describe('TextEncoderTest', function () {
* @tc.require: AR000GFB4U
* @tc.author: shikai
*/
it
(
'
testUtilGetErrorString001
'
,
0
,
async
function
()
{
it
(
'
testUtilGetErrorString001
'
,
0
,
async
function
()
{
var
errnum
=
10
;
var
result
=
util
.
getErrorString
(
errnum
);
expect
(
result
).
assertEqual
(
'
No child process
'
);
expect
(
result
).
assertEqual
(
'
Unknown system error 10
'
);
})
/**
...
...
@@ -139,7 +139,7 @@ describe('TextEncoderTest', function () {
it
(
'
testUtilGetErrorString002
'
,
0
,
async
function
()
{
var
errnum
=
0
;
var
result
=
util
.
getErrorString
(
errnum
);
expect
(
result
).
assertEqual
(
'
No error information
'
);
expect
(
result
).
assertEqual
(
'
Unknown system error 0
'
);
})
/**
...
...
@@ -151,7 +151,7 @@ describe('TextEncoderTest', function () {
it
(
'
testUtilGetErrorString003
'
,
0
,
async
function
()
{
var
errnum
=
-
1
;
var
result
=
util
.
getErrorString
(
errnum
);
expect
(
result
).
assertEqual
(
'
No error information
'
);
expect
(
result
).
assertEqual
(
'
operation not permitted
'
);
})
/**
...
...
@@ -163,7 +163,7 @@ describe('TextEncoderTest', function () {
it
(
'
testUtilGetErrorString004
'
,
0
,
async
function
()
{
var
errnum
=
9
;
var
result
=
util
.
getErrorString
(
errnum
);
expect
(
result
).
assertEqual
(
'
Bad file descriptor
'
);
expect
(
result
).
assertEqual
(
'
Unknown system error 9
'
);
})
/**
...
...
@@ -175,7 +175,7 @@ describe('TextEncoderTest', function () {
it
(
'
testUtilGetErrorString005
'
,
0
,
async
function
()
{
var
errnum
=
555
;
var
result
=
util
.
getErrorString
(
errnum
);
expect
(
result
).
assertEqual
(
'
No error information
'
);
expect
(
result
).
assertEqual
(
'
Unknown system error 555
'
);
})
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录