Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f2fa1911
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看板
未验证
提交
f2fa1911
编写于
5月 11, 2022
作者:
O
openharmony_ci
提交者:
Gitee
5月 11, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3147 修改process xts 用例
Merge pull request !3147 from xllify/master
上级
291f11cf
4f2b8955
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
153 addition
and
211 deletion
+153
-211
compileruntime/process_lib_standard/src/main/js/test/Process.test.js
...ime/process_lib_standard/src/main/js/test/Process.test.js
+153
-211
未找到文件。
compileruntime/process_lib_standard/src/main/js/test/Process.test.js
浏览文件 @
f2fa1911
...
...
@@ -16,72 +16,6 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
import
process
from
'
@ohos.process
'
describe
(
'
ChildProcessTest
'
,
function
()
{
/**
* @tc.name: testKill001
* @tc.desc: return boolean is whether the current process signal is sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill001
'
,
0
,
function
()
{
let
child
=
process
.
runCmd
(
'
ls; sleep 5s;
'
)
let
result
=
child
.
kill
(
13
)
let
temp
=
child
.
killed
expect
(
temp
).
assertEqual
(
true
)
})
/**
* @tc.name: testKill002
* @tc.desc: return boolean is whether the current process signal is sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill002
'
,
0
,
function
()
{
let
child
=
process
.
runCmd
(
'
ls; sleep 5s;
'
)
let
result
=
child
.
kill
(
1
)
let
temp
=
child
.
killed
expect
(
temp
).
assertEqual
(
true
)
})
/**
* @tc.name: testKill003
* @tc.desc: return boolean is whether the current process signal is sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill003
'
,
0
,
function
()
{
let
child
=
process
.
runCmd
(
'
ls; sleep 5s;
'
)
let
result
=
child
.
kill
(
'
SIGHUP
'
)
let
temp
=
child
.
killed
expect
(
temp
).
assertEqual
(
true
)
})
/**
* @tc.name: testKill004
* @tc.desc: return boolean is whether the current process signal is sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill004
'
,
0
,
function
()
{
let
child
=
process
.
runCmd
(
'
ls; sleep 5s;
'
)
let
result
=
child
.
kill
(
'
ABC
'
)
let
temp
=
child
.
killed
expect
(
temp
).
assertEqual
(
true
)
})
/**
* @tc.name: testKill005
* @tc.desc: return boolean is whether the current process signal is sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill005
'
,
0
,
function
()
{
let
child
=
process
.
runCmd
(
'
ls
'
)
child
.
wait
()
let
result
=
child
.
kill
(
9
)
let
temp
=
child
.
killed
expect
(
temp
).
assertEqual
(
false
)
})
/**
* @tc.name: testGetUid001
* @tc.desc: returns the digital user id of the process.
...
...
@@ -123,7 +57,7 @@ describe('ChildProcessTest', function () {
it
(
'
testGetUid003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
6
;
i
++
){
let
result
=
process
.
uid
if
(
result
!=
null
)
{
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
var
flag
=
true
}
...
...
@@ -139,10 +73,10 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetUid004
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
8
;
i
++
){
for
(
let
i
=
0
;
i
<
8
;
i
++
){
let
result
=
process
.
uid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
var
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -157,10 +91,10 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testGetUid005
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
){
for
(
let
i
=
0
;
i
<
5
;
i
++
){
let
result
=
process
.
uid
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
if
(
result
!=
null
)
{
if
(
result
>
0
)
{
var
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -168,6 +102,64 @@ describe('ChildProcessTest', function () {
}
})
/**
* @tc.name: testKill001
* @tc.desc: Return whether the signal was sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill001
'
,
0
,
function
()
{
let
result
=
process
.
kill
(
3
,
123
)
expect
(
result
).
assertEqual
(
false
)
})
/**
* @tc.name: testKill002
* @tc.desc: Return whether the signal was sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill002
'
,
0
,
function
()
{
let
pres
=
process
.
pid
let
result
=
process
.
kill
(
23
,
pres
)
expect
(
result
).
assertEqual
(
true
)
})
/**
* @tc.name: testKill003
* @tc.desc: Return whether the signal was sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill003
'
,
0
,
function
()
{
let
pres
=
process
.
pid
let
result
=
process
.
kill
(
28
,
pres
)
expect
(
result
).
assertEqual
(
true
)
})
/**
* @tc.name: testKill004
* @tc.desc: Return whether the signal was sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill004
'
,
0
,
function
()
{
let
pres
=
process
.
pid
let
result
=
process
.
kill
(
17
,
pres
)
expect
(
result
).
assertEqual
(
true
)
})
/**
* @tc.name: testKill005
* @tc.desc: Return whether the signal was sent successfully.
* @tc.require: AR000GFB2S
* @tc.author: wangben
*/
it
(
'
testKill005
'
,
0
,
function
()
{
let
result
=
process
.
kill
(
3
,
113
)
expect
(
result
).
assertEqual
(
false
)
})
/**
* @tc.name: testUptime001
* @tc.desc: Returns the running time of the system.
...
...
@@ -182,8 +174,7 @@ describe('ChildProcessTest', function () {
sleep
(
6
);
let
result2
=
process
.
uptime
()
var
flag
=
false
if
((
result2
-
result1
)
>=
6
)
{
if
((
result2
-
result1
)
>=
6
)
{
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -198,13 +189,12 @@ describe('ChildProcessTest', function () {
it
(
'
testUptime002
'
,
0
,
function
()
{
let
result1
=
process
.
uptime
()
function
sleep
(
d
){
while
(
process
.
uptime
()
-
result1
<=
d
);
while
(
process
.
uptime
()
-
result1
<=
d
);
}
sleep
(
8
);
let
result2
=
process
.
uptime
()
var
flag
=
false
if
((
result2
-
result1
)
>=
8
)
{
if
((
result2
-
result1
)
>=
8
)
{
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -219,13 +209,12 @@ describe('ChildProcessTest', function () {
it
(
'
testUptime003
'
,
0
,
function
()
{
let
result1
=
process
.
uptime
()
function
sleep
(
d
){
while
(
process
.
uptime
()
-
result1
<=
d
);
while
(
process
.
uptime
()
-
result1
<=
d
);
}
sleep
(
10
);
let
result2
=
process
.
uptime
()
var
flag
=
false
if
((
result2
-
result1
)
>=
10
)
{
if
((
result2
-
result1
)
>=
10
)
{
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -240,13 +229,12 @@ describe('ChildProcessTest', function () {
it
(
'
testUptime004
'
,
0
,
function
()
{
let
result1
=
process
.
uptime
()
function
sleep
(
d
){
while
(
process
.
uptime
()
-
result1
<=
d
);
while
(
process
.
uptime
()
-
result1
<=
d
);
}
sleep
(
7
);
let
result2
=
process
.
uptime
()
var
flag
=
false
if
((
result2
-
result1
)
>=
7
)
{
if
((
result2
-
result1
)
>=
7
)
{
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -261,13 +249,12 @@ describe('ChildProcessTest', function () {
it
(
'
testUptime005
'
,
0
,
function
()
{
let
result1
=
process
.
uptime
()
function
sleep
(
d
){
while
(
process
.
uptime
()
-
result1
<=
d
);
while
(
process
.
uptime
()
-
result1
<=
d
);
}
sleep
(
11
);
let
result2
=
process
.
uptime
()
var
flag
=
false
if
((
result2
-
result1
)
>=
11
)
{
if
((
result2
-
result1
)
>=
11
)
{
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -281,7 +268,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
testPid001
'
,
0
,
function
()
{
let
result
=
process
.
pid
if
(
result
>
0
)
{
if
(
result
>
0
)
{
var
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -294,10 +281,9 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testPid002
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
result
=
process
.
pid
if
(
result
>
0
)
{
if
(
result
>
0
)
{
var
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -311,10 +297,9 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testPid003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
result
=
process
.
pid
if
(
result
>
0
)
{
if
(
result
>
0
)
{
var
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -328,10 +313,9 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testPid004
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
let
result
=
process
.
pid
if
(
result
>
0
)
{
if
(
result
>
0
)
{
var
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -345,10 +329,9 @@ describe('ChildProcessTest', function () {
* @tc.author: wangben
*/
it
(
'
testPid005
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
let
result
=
process
.
pid
if
(
result
>
0
)
{
if
(
result
>
0
)
{
var
flag
=
true
}
expect
(
flag
).
assertEqual
(
true
)
...
...
@@ -363,8 +346,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-001
'
,
0
,
function
()
{
let
pres
=
process
.
tid
if
(
pres
>
0
)
{
if
(
pres
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -377,11 +359,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-002
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pres
=
process
.
tid
if
(
pres
>
0
)
{
if
(
pres
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -395,11 +375,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pres
=
process
.
tid
if
(
pres
>
0
)
{
if
(
pres
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -425,9 +403,8 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-005
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pres
=
process
.
isIsolatedProcess
()
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pres
=
process
.
isIsolatedProcess
()
expect
(
pres
).
assertEqual
(
true
)
}
})
...
...
@@ -439,9 +416,8 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-006
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pres
=
process
.
isIsolatedProcess
()
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pres
=
process
.
isIsolatedProcess
()
expect
(
pres
).
assertEqual
(
true
)
}
})
...
...
@@ -510,10 +486,11 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-009
'
,
0
,
function
()
{
let
isorno
=
process
.
is64Bit
()
if
(
isorno
)
{
expect
(
isorno
).
assertEqual
(
t
ur
e
)
}
if
(
isorno
)
{
expect
(
isorno
).
assertEqual
(
t
ru
e
)
}
else
{
expect
(
isorno
).
assertEqual
(
false
)
}
})
/**
...
...
@@ -523,14 +500,14 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-010
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
isorno
=
process
.
is64Bit
()
if
(
isorno
)
{
expect
(
isorno
).
assertEqual
(
t
ur
e
)
}
if
(
isorno
)
{
expect
(
isorno
).
assertEqual
(
t
ru
e
)
}
else
{
expect
(
isorno
).
assertEqual
(
false
)
}
}
})
/**
...
...
@@ -540,14 +517,14 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-011
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
isorno
=
process
.
is64Bit
()
if
(
isorno
)
{
expect
(
isorno
).
assertEqual
(
t
ur
e
)
}
if
(
isorno
)
{
expect
(
isorno
).
assertEqual
(
t
ru
e
)
}
else
{
expect
(
isorno
).
assertEqual
(
false
)
}
}
})
...
...
@@ -559,8 +536,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-012
'
,
0
,
function
()
{
let
pres
=
process
.
getUidForName
(
"
root
"
)
if
(
pres
!=
-
1
)
{
if
(
pres
!=
-
1
)
{
let
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -573,8 +549,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-013
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pres
=
process
.
getUidForName
(
"
12356
"
)
expect
(
pres
).
assertEqual
(
-
1
)
}
...
...
@@ -587,8 +562,7 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-014
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pres
=
process
.
getUidForName
(
"
12356
"
)
expect
(
pres
).
assertEqual
(
-
1
)
}
...
...
@@ -604,8 +578,7 @@ describe('ChildProcessTest', function () {
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-015
'
,
0
,
function
()
{
let
pres
=
process
.
tid
let
pri
=
process
.
getThreadPriority
(
pres
)
if
(
pri
)
{
if
(
pri
)
{
let
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -619,11 +592,9 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-016
'
,
0
,
function
()
{
let
pres
=
process
.
tid
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getThreadPriority
(
pres
)
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
let
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -638,11 +609,9 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-017
'
,
0
,
function
()
{
let
pres
=
process
.
tid
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getThreadPriority
(
pres
)
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
let
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -657,11 +626,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-019
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
if
(
pri
!==
null
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -677,8 +644,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-018
'
,
0
,
function
()
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
if
(
pri
!==
null
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -692,11 +658,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-020
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
if
(
pri
!==
null
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -711,9 +675,13 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-021
'
,
0
,
function
()
{
let
priOne
=
process
.
getStartRealtime
()
let
priTwo
=
process
.
getStartRealtime
()
expect
(
priOne
-
priTwo
).
assertEqual
(
0
)
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
})
/**
...
...
@@ -724,11 +692,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetstartrealtime004
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
if
(
pri
!==
null
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -742,11 +708,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetpastCpuTime001
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -761,8 +725,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-022
'
,
0
,
function
()
{
let
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -775,11 +738,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-023
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -793,11 +754,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-024
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
let
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -813,8 +772,7 @@ describe('ChildProcessTest', function () {
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-025
'
,
0
,
function
()
{
let
_SC_ARG_MAX
=
0
let
pri
=
process
.
getSystemConfig
(
_SC_ARG_MAX
)
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -828,11 +786,9 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-026
'
,
0
,
function
()
{
let
_SC_ARG_MAX
=
0
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getSystemConfig
(
_SC_ARG_MAX
)
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -847,11 +803,9 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-027
'
,
0
,
function
()
{
let
_SC_ARG_MAX
=
0
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getSystemConfig
(
_SC_ARG_MAX
)
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -867,8 +821,7 @@ describe('ChildProcessTest', function () {
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-028
'
,
0
,
function
()
{
let
_SC_OPEN_MAX
=
4
let
pri
=
process
.
getSystemConfig
(
_SC_OPEN_MAX
)
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -883,8 +836,7 @@ describe('ChildProcessTest', function () {
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-029
'
,
0
,
function
()
{
let
_SC_PAGESIZE
=
8
let
pri
=
process
.
getSystemConfig
(
_SC_PAGESIZE
)
if
(
pri
>
0
)
{
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
}
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
...
...
@@ -898,7 +850,7 @@ describe('ChildProcessTest', function () {
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-033
'
,
0
,
function
()
{
let
pri
=
process
.
getEnvironmentVar
(
"
USER
"
)
if
(
pri
!=
null
)
{
if
(
pri
!=
null
)
{
var
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -911,11 +863,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-036
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
PATH
"
)
if
(
pri
!=
null
)
{
if
(
pri
!=
null
)
{
var
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -929,11 +879,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
PATH
"
)
if
(
pri
!=
null
)
{
if
(
pri
!=
null
)
{
var
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -947,11 +895,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-034
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
USER
"
)
if
(
pri
!=
null
)
{
if
(
pri
!=
null
)
{
var
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -965,11 +911,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-035
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
USER
"
)
if
(
pri
!=
null
)
{
if
(
pri
!=
null
)
{
var
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
@@ -983,11 +927,9 @@ describe('ChildProcessTest', function () {
* @tc.author: liwenqiang
*/
it
(
'
SUB_Runtime_JSAPI_SR000GGR3G-037
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
100
;
i
++
)
{
for
(
let
i
=
0
;
i
<
100
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
i123
"
)
if
(
pri
==
null
)
{
if
(
pri
==
null
)
{
var
flag
=
new
Boolean
(
true
)
expect
(
Boolean
(
flag
)).
assertEqual
(
true
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录