Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
6515a2c7
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看板
未验证
提交
6515a2c7
编写于
7月 21, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 21, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
回退 'Pull Request !4467 : Modify the problem of the same name in the XTS test case'
上级
856db888
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
525 addition
and
525 deletion
+525
-525
compileruntime/process_lib_standard/src/main/js/test/Process.test.js
...ime/process_lib_standard/src/main/js/test/Process.test.js
+71
-71
compileruntime/uri_lib_standard/src/main/js/test/uri.test.js
compileruntime/uri_lib_standard/src/main/js/test/uri.test.js
+82
-82
compileruntime/url_lib_standard/src/main/js/test/url.test.js
compileruntime/url_lib_standard/src/main/js/test/url.test.js
+19
-19
compileruntime/util_lib_standard/src/main/js/test/util.test.js
...leruntime/util_lib_standard/src/main/js/test/util.test.js
+353
-353
未找到文件。
compileruntime/process_lib_standard/src/main/js/test/Process.test.js
浏览文件 @
6515a2c7
...
...
@@ -320,11 +320,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testTid
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns the tid of the current thread.
* @tc.author: liwenqiang
*/
it
(
'
testTid
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
let
pres
=
process
.
tid
if
(
pres
>
0
)
{
var
flag
=
new
Boolean
(
true
)
...
...
@@ -333,11 +333,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testTid
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns the tid of the current thread.
* @tc.author: liwenqiang
*/
it
(
'
testTid
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pres
=
process
.
tid
if
(
pres
>
0
)
{
...
...
@@ -348,11 +348,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testTid
003
* @tc.name:
SUB_Runtime_JSAPI_
003
* @tc.desc: Returns the tid of the current thread.
* @tc.author: liwenqiang
*/
it
(
'
testTid
003
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pres
=
process
.
tid
if
(
pres
>
0
)
{
...
...
@@ -364,21 +364,21 @@ describe('ChildProcessTest', function () {
/**
* @tc.name:
testisIsolatedProcess
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns a boolean whether the process is isolated.
* @tc.author: liwenqiang
*/
it
(
'
testisIsolatedProcess
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
let
pres
=
process
.
isIsolatedProcess
()
expect
(
pres
).
assertEqual
(
true
)
})
/**
* @tc.name:
testisIsolatedProcess
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns a boolean whether the process is isolated.
* @tc.author: liwenqiang
*/
it
(
'
testisIsolatedProcess
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pres
=
process
.
isIsolatedProcess
()
expect
(
pres
).
assertEqual
(
true
)
...
...
@@ -386,11 +386,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testisIsolatedProcess
003
* @tc.name:
SUB_Runtime_JSAPI_
003
* @tc.desc: Returns a boolean whether the process is isolated.
* @tc.author: liwenqiang
*/
it
(
'
testisIsolatedProcess
003
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pres
=
process
.
isIsolatedProcess
()
expect
(
pres
).
assertEqual
(
true
)
...
...
@@ -399,21 +399,21 @@ describe('ChildProcessTest', function () {
/**
* @tc.name:
testIsappuid
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns a boolean whether the specified uid belongs to a particular application.
* @tc.author: liwenqiang
*/
it
(
'
testIsappuid
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
let
isorno
=
process
.
isAppUid
(
167
)
expect
(
isorno
).
assertEqual
(
false
)
})
/**
* @tc.name:
testIsappuid
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns a boolean whether the specified uid belongs to a particular application.
* @tc.author: liwenqiang
*/
it
(
'
testIsappuid
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
let
isorno
=
process
.
isAppUid
(
123
)
expect
(
isorno
).
assertEqual
(
false
)
})
...
...
@@ -449,11 +449,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testIs64Bit
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns a boolean whether the process is running in a 64-bit environment.
* @tc.author: liwenqiang
*/
it
(
'
testIs64Bit
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
let
isorno
=
process
.
is64Bit
()
if
(
isorno
)
{
expect
(
isorno
).
assertEqual
(
true
)
...
...
@@ -463,11 +463,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testIs64Bit
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns a boolean whether the process is running in a 64-bit environment.
* @tc.author: liwenqiang
*/
it
(
'
testIs64Bit
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
isorno
=
process
.
is64Bit
()
if
(
isorno
)
{
...
...
@@ -479,11 +479,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testIs64Bit
003
* @tc.name:
SUB_Runtime_JSAPI_
003
* @tc.desc: Returns a boolean whether the process is running in a 64-bit environment.
* @tc.author: liwenqiang
*/
it
(
'
testIs64Bit004
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
isorno
=
process
.
is64Bit
()
if
(
isorno
)
{
...
...
@@ -496,11 +496,11 @@ describe('ChildProcessTest', function () {
/**
* @tc.name:
testGetUidForName
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns the uid based on the specified user name.
* @tc.author: liwenqiang
*/
it
(
'
testGetUidForName
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
let
pres
=
process
.
getUidForName
(
"
root
"
)
if
(
pres
!=
-
1
)
{
let
flag
=
new
Boolean
(
true
)
...
...
@@ -509,11 +509,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetUidForName
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns the uid based on the specified user name.
* @tc.author: liwenqiang
*/
it
(
'
testGetUidForName
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pres
=
process
.
getUidForName
(
"
12356
"
)
expect
(
pres
).
assertEqual
(
-
1
)
...
...
@@ -521,11 +521,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetUidForName
003
* @tc.name:
SUB_Runtime_JSAPI_
003
* @tc.desc: Returns the uid based on the specified user name.
* @tc.author: liwenqiang
*/
it
(
'
testGetUidForName
003
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pres
=
process
.
getUidForName
(
"
12356
"
)
expect
(
pres
).
assertEqual
(
-
1
)
...
...
@@ -534,11 +534,11 @@ describe('ChildProcessTest', function () {
/**
* @tc.name:
testGetThreadPriority
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns the thread priority based on the specified tid.
* @tc.author: liwenqiang
*/
it
(
'
testGetThreadPriority
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
let
pres
=
process
.
tid
let
pri
=
process
.
getThreadPriority
(
pres
)
if
(
pri
)
{
...
...
@@ -548,11 +548,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetThreadPriority
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns the thread priority based on the specified tid.
* @tc.author: liwenqiang
*/
it
(
'
testGetThreadPriority
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
let
pres
=
process
.
tid
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getThreadPriority
(
pres
)
...
...
@@ -564,11 +564,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetThreadPriority
003
* @tc.name:
SUB_Runtime_JSAPI_
003
* @tc.desc: Returns the thread priority based on the specified tid.
* @tc.author: liwenqiang
*/
it
(
'
testGetThreadPriority
003
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
003
'
,
0
,
function
()
{
let
pres
=
process
.
tid
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getThreadPriority
(
pres
)
...
...
@@ -580,12 +580,12 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetStartRealtime
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of
* @the system to the start of the process.
* @tc.author: liwenqiang
*/
it
(
'
testGetStartRealtime
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
...
...
@@ -596,12 +596,12 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetStartRealtime
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of
* @the system to the start of the process.
* @tc.author: liwenqiang
*/
it
(
'
testGetStartRealtime
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
var
flag
=
new
Boolean
(
true
)
...
...
@@ -610,12 +610,12 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetStartRealtime
003
* @tc.name:
SUB_Runtime_JSAPI_
003
* @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of
* @the system to the start of the process.
* @tc.author: liwenqiang
*/
it
(
'
testGetStartRealtime
003
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
...
...
@@ -626,12 +626,12 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetStartRealtime
004
* @tc.name:
SUB_Runtime_JSAPI_
004
* @tc.desc: Returns the elapsed real time (in milliseconds)
* @taken from the start of the system to the start of the process.
* @tc.author: liwenqiang
*/
it
(
'
testGetStartRealtime
004
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
004
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
...
...
@@ -642,12 +642,12 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name: testGet
StartR
ealtime005
* @tc.name: testGet
startr
ealtime005
* @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of
* @the system to the start of the process.
* @tc.author: liwenqiang
*/
it
(
'
testGet
StartR
ealtime005
'
,
0
,
function
()
{
it
(
'
testGet
startr
ealtime005
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
let
pri
=
process
.
getStartRealtime
()
if
(
pri
!==
null
)
{
...
...
@@ -673,11 +673,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetpastCpuTime
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time.
* @tc.author: liwenqiang
*/
it
(
'
testGetpastCpuTime
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
let
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
{
var
flag
=
new
Boolean
(
true
)
...
...
@@ -686,11 +686,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetpastCpuTime
003
* @tc.name:
SUB_Runtime_JSAPI_
003
* @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time.
* @tc.author: liwenqiang
*/
it
(
'
testGetpastCpuTime
003
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
003
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
{
...
...
@@ -701,11 +701,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetpastCpuTime
004
* @tc.name:
SUB_Runtime_JSAPI_
004
* @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time.
* @tc.author: liwenqiang
*/
it
(
'
testGetpastCpuTime
004
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
004
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
let
pri
=
process
.
getPastCpuTime
()
if
(
pri
>
0
)
{
...
...
@@ -716,11 +716,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetSystemConfig
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns the system configuration at runtime.
* @tc.author: liwenqiang
*/
it
(
'
testGetSystemConfig
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
let
_SC_ARG_MAX
=
0
let
pri
=
process
.
getSystemConfig
(
_SC_ARG_MAX
)
if
(
pri
>
0
)
{
...
...
@@ -730,11 +730,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetSystemConfig
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns the system configuration at runtime.
* @tc.author: liwenqiang
*/
it
(
'
testGetSystemConfig
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
let
_SC_ARG_MAX
=
0
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getSystemConfig
(
_SC_ARG_MAX
)
...
...
@@ -746,11 +746,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetSystemConfig
003
* @tc.name:
SUB_Runtime_JSAPI_
003
* @tc.desc: Returns the system configuration at runtime.
* @tc.author: liwenqiang
*/
it
(
'
testGetSystemConfig
003
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
003
'
,
0
,
function
()
{
let
_SC_ARG_MAX
=
0
for
(
let
i
=
0
;
i
<
5
;
i
++
)
{
let
pri
=
process
.
getSystemConfig
(
_SC_ARG_MAX
)
...
...
@@ -762,11 +762,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetSystemConfig
004
* @tc.name:
SUB_Runtime_JSAPI_
004
* @tc.desc: Returns the system configuration at runtime.
* @tc.author: liwenqiang
*/
it
(
'
testGetSystemConfig
004
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
004
'
,
0
,
function
()
{
let
_SC_OPEN_MAX
=
4
let
pri
=
process
.
getSystemConfig
(
_SC_OPEN_MAX
)
if
(
pri
>
0
)
{
...
...
@@ -776,11 +776,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetSystemConfig
005
* @tc.name:
SUB_Runtime_JSAPI_
005
* @tc.desc: Returns the system configuration at runtime.
* @tc.author: liwenqiang
*/
it
(
'
testGetSystemConfig
005
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
005
'
,
0
,
function
()
{
let
_SC_PAGESIZE
=
8
let
pri
=
process
.
getSystemConfig
(
_SC_PAGESIZE
)
if
(
pri
>
0
)
{
...
...
@@ -790,11 +790,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetEnvironmentVar
001
* @tc.name:
SUB_Runtime_JSAPI_
001
* @tc.desc: Returns the system value for environment variables.
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar
001
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
001
'
,
0
,
function
()
{
let
pri
=
process
.
getEnvironmentVar
(
"
USER
"
)
if
(
pri
!=
null
)
{
var
flag
=
new
Boolean
(
true
)
...
...
@@ -803,11 +803,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetEnvironmentVar
002
* @tc.name:
SUB_Runtime_JSAPI_
002
* @tc.desc: Returns the system value for environment variables.
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar
002
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
002
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
PATH
"
)
if
(
pri
!=
null
)
{
...
...
@@ -833,11 +833,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetEnvironmentVar
004
* @tc.name:
SUB_Runtime_JSAPI_
004
* @tc.desc: Returns the system value for environment variables.
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar
004
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
004
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
6
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
USER
"
)
if
(
pri
!=
null
)
{
...
...
@@ -848,11 +848,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetEnvironmentVar
005
* @tc.name:
SUB_Runtime_JSAPI_
005
* @tc.desc: Returns the system value for environment variables.
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar
005
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
005
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
8
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
USER
"
)
if
(
pri
!=
null
)
{
...
...
@@ -863,11 +863,11 @@ describe('ChildProcessTest', function () {
})
/**
* @tc.name:
testGetEnvironmentVar
006
* @tc.name:
SUB_Runtime_JSAPI_
006
* @tc.desc: Returns the system value for environment variables.
* @tc.author: liwenqiang
*/
it
(
'
testGetEnvironmentVar
006
'
,
0
,
function
()
{
it
(
'
SUB_Runtime_JSAPI_
006
'
,
0
,
function
()
{
for
(
let
i
=
0
;
i
<
100
;
i
++
)
{
let
pri
=
process
.
getEnvironmentVar
(
"
i123
"
)
if
(
pri
==
null
)
{
...
...
@@ -876,4 +876,4 @@ describe('ChildProcessTest', function () {
}
}
})
})
\ No newline at end of file
})}
compileruntime/uri_lib_standard/src/main/js/test/uri.test.js
浏览文件 @
6515a2c7
此差异已折叠。
点击以展开。
compileruntime/url_lib_standard/src/main/js/test/url.test.js
浏览文件 @
6515a2c7
...
...
@@ -436,22 +436,22 @@ describe('UrlFunTest', function () {
})
/**
* @tc.name: testUrl
Get
002
* @tc.name: testUrl
ForEach
002
* @tc.desc: Returns the first value associated to the given search parameter.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
Get
002
'
,
0
,
function
()
{
it
(
'
testUrl
ForEach
002
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
key1=value1&key2=value2
"
)
var
result
=
params
.
get
(
"
key2
"
)
expect
(
result
).
assertEqual
(
"
value2
"
)
})
/**
* @tc.name: testUrl
Get
003
* @tc.name: testUrl
ForEach
003
* @tc.desc: Returns the first value associated to the given search parameter.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
Get
003
'
,
0
,
function
()
{
it
(
'
testUrl
ForEach
003
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
key1=value1&key2=value2
"
)
params
.
append
(
"
5
"
,
"
JKL
"
)
var
result
=
params
.
get
(
"
5
"
)
...
...
@@ -459,22 +459,22 @@ describe('UrlFunTest', function () {
})
/**
* @tc.name: testUrl
Get
004
* @tc.name: testUrl
ForEach
004
* @tc.desc: Returns the first value associated to the given search parameter.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
Get
004
'
,
0
,
function
()
{
it
(
'
testUrl
ForEach
004
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
key1=value1&key2=value2
"
)
var
result
=
params
.
get
(
"
key1
"
)
expect
(
result
).
assertEqual
(
"
value1
"
)
})
/**
* @tc.name: testUrl
Get
005
* @tc.name: testUrl
ForEach
005
* @tc.desc: Returns the first value associated to the given search parameter.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
Get
005
'
,
0
,
function
()
{
it
(
'
testUrl
ForEach
005
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
key1=value1&key2=value2
"
)
params
.
append
(
"
jss
"
,
"
JL
"
)
var
result
=
params
.
get
(
"
jss
"
)
...
...
@@ -893,22 +893,22 @@ describe('UrlFunTest', function () {
})
/**
* @tc.name: testUrl
SearchParams
ToString001
* @tc.name: testUrlToString001
* @tc.desc: Returns a query string suitable for use in a URL.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
SearchParams
ToString001
'
,
0
,
function
()
{
it
(
'
testUrlToString001
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
d=value1&c=value2&b=大
"
)
var
result
=
params
.
toString
()
expect
(
result
).
assertEqual
(
"
d=value1&c=value2&b=%E5%A4%A7
"
)
})
/**
* @tc.name: testUrl
SearchParams
ToString002
* @tc.name: testUrlToString002
* @tc.desc: Returns a query string suitable for use in a URL.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
SearchParams
ToString002
'
,
0
,
function
()
{
it
(
'
testUrlToString002
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
d=value1&c=value2&b= 大
"
)
params
.
append
(
"
1 12
"
,
"
QQQ
"
)
var
result
=
params
.
toString
()
...
...
@@ -916,11 +916,11 @@ describe('UrlFunTest', function () {
})
/**
* @tc.name: testUrl
SearchParams
ToString003
* @tc.name: testUrlToString003
* @tc.desc: Returns a query string suitable for use in a URL.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
SearchParams
ToString003
'
,
0
,
function
()
{
it
(
'
testUrlToString003
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
¥=)
"
)
params
.
delete
(
"
5
"
)
var
result
=
params
.
toString
()
...
...
@@ -928,22 +928,22 @@ describe('UrlFunTest', function () {
})
/**
* @tc.name: testUrl
SearchParams
ToString004
* @tc.name: testUrlToString004
* @tc.desc: Returns a query string suitable for use in a URL.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
SearchParams
ToString004
'
,
0
,
function
()
{
it
(
'
testUrlToString004
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
d=value1&c=value2&b=大&4=key4
"
)
var
result
=
params
.
toString
()
expect
(
result
).
assertEqual
(
"
d=value1&c=value2&b=%E5%A4%A7&4=key4
"
)
})
/**
* @tc.name: testUrl
SearchParams
ToString005
* @tc.name: testUrlToString005
* @tc.desc: Returns a query string suitable for use in a URL.
* @tc.author: maxiaodong
*/
it
(
'
testUrl
SearchParams
ToString005
'
,
0
,
function
()
{
it
(
'
testUrlToString005
'
,
0
,
function
()
{
let
params
=
new
Url
.
URLSearchParams
(
"
d=value1&c=value2&b= 大&4=key4&5=key5
"
)
params
.
append
(
"
1 12
"
,
"
QQQ
"
)
var
result
=
params
.
toString
()
...
...
@@ -2064,4 +2064,4 @@ describe('UrlFunTest', function () {
var
result
=
params
.
searchParams
.
toString
();
expect
(
result
).
assertEqual
(
'
abc=123&def=456
'
)
})
})
\ No newline at end of file
})}
compileruntime/util_lib_standard/src/main/js/test/util.test.js
浏览文件 @
6515a2c7
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录