Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1ae3d501
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看板
未验证
提交
1ae3d501
编写于
2月 11, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 11, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1850 Solve the problem that the compileruntime test suite does not compile
Merge pull request !1850 from 小马奔腾/OpenHarmony-3.0-LTS
上级
e99befce
30e9aa41
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
28 addition
and
28 deletion
+28
-28
compileruntime/process_lib_standard/Test.json
compileruntime/process_lib_standard/Test.json
+1
-1
compileruntime/url_lib_standard/Test.json
compileruntime/url_lib_standard/Test.json
+1
-1
compileruntime/util_lib_standard/Test.json
compileruntime/util_lib_standard/Test.json
+1
-1
compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js
...ntime/worker_lib_standard/src/main/js/test/Worker.test.js
+24
-25
test_packages.gni
test_packages.gni
+1
-0
未找到文件。
compileruntime/process_lib_standard/Test.json
浏览文件 @
1ae3d501
...
...
@@ -2,7 +2,7 @@
"description"
:
"Configuration for startup process js api Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
6
0000"
,
"test-timeout"
:
"
30
0000"
,
"package"
:
"com.example.childprocess"
,
"shell-timeout"
:
"60000"
},
...
...
compileruntime/url_lib_standard/Test.json
浏览文件 @
1ae3d501
...
...
@@ -2,7 +2,7 @@
"description"
:
"Configuration for startup url js api Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
6
0000"
,
"test-timeout"
:
"
30
0000"
,
"package"
:
"com.example.url"
,
"shell-timeout"
:
"60000"
},
...
...
compileruntime/util_lib_standard/Test.json
浏览文件 @
1ae3d501
...
...
@@ -2,7 +2,7 @@
"description"
:
"Configuration for startup util js api Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
6
0000"
,
"test-timeout"
:
"
30
0000"
,
"package"
:
"com.example.childprocess"
,
"shell-timeout"
:
"60000"
},
...
...
compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js
浏览文件 @
1ae3d501
...
...
@@ -17,7 +17,6 @@
import
app
from
'
@system.app
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
worker
from
'
@ohos.worker
'
var
worker
=
globalThis
.
requireNapi
(
'
worker
'
);
describe
(
'
workerTest
'
,
function
()
{
...
...
@@ -388,33 +387,33 @@ describe('workerTest', function () {
it
(
'
worker_off_test_001
'
,
0
,
function
()
{
var
ss
=
new
worker
.
Worker
(
"
workers/worker.js
"
);
var
zhangsan
_t
imes
=
0
;
var
zhangsan
T
imes
=
0
;
ss
.
on
(
"
zhangsan
"
,
()
=>
{
zhangsan
_t
imes
++
;
zhangsan
T
imes
++
;
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
1
)
expect
(
zhangsan
T
imes
).
assertEqual
(
1
)
ss
.
off
(
"
zhangsan
"
)
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
1
)
expect
(
zhangsan
T
imes
).
assertEqual
(
1
)
})
// check worker off function is ok
it
(
'
worker_off_test_002
'
,
0
,
function
()
{
var
ss
=
new
worker
.
Worker
(
"
workers/worker.js
"
);
var
zhangsan
_t
imes
=
0
;
var
zhangsan
T
imes
=
0
;
ss
.
on
(
"
zhangsan
"
,
()
=>
{
zhangsan
_t
imes
++
;
zhangsan
T
imes
++
;
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
2
)
expect
(
zhangsan
T
imes
).
assertEqual
(
2
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -422,40 +421,40 @@ describe('workerTest', function () {
}
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
2
)
expect
(
zhangsan
T
imes
).
assertEqual
(
2
)
})
// check worker removeEventListener function is ok
it
(
'
worker_removeListener_test_001
'
,
0
,
function
()
{
var
ss
=
new
worker
.
Worker
(
"
workers/worker.js
"
);
var
zhangsan
_t
imes
=
0
;
var
zhangsan
T
imes
=
0
;
ss
.
addEventListener
(
"
zhangsan
"
,
()
=>
{
zhangsan
_t
imes
++
;
zhangsan
T
imes
++
;
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
1
)
expect
(
zhangsan
T
imes
).
assertEqual
(
1
)
ss
.
removeEventListener
(
"
zhangsan
"
)
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
1
)
expect
(
zhangsan
T
imes
).
assertEqual
(
1
)
})
// check worker removeEventListener function is ok
it
(
'
worker_removeListener_test_002
'
,
0
,
function
()
{
var
ss
=
new
worker
.
Worker
(
"
workers/worker.js
"
);
var
zhangsan
_t
imes
=
0
;
var
zhangsan
T
imes
=
0
;
ss
.
addEventListener
(
"
zhangsan
"
,
()
=>
{
zhangsan
_t
imes
++
;
zhangsan
T
imes
++
;
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
2
)
expect
(
zhangsan
T
imes
).
assertEqual
(
2
)
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -463,39 +462,39 @@ describe('workerTest', function () {
}
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
2
)
expect
(
zhangsan
T
imes
).
assertEqual
(
2
)
})
// check worker removeAllListener function is ok
it
(
'
worker_removeListener_test_003
'
,
0
,
function
()
{
var
ss
=
new
worker
.
Worker
(
"
workers/worker.js
"
);
var
zhangsan
_t
imes
=
0
;
var
zhangsan
T
imes
=
0
;
ss
.
addEventListener
(
"
zhangsan
"
,
()
=>
{
zhangsan
_t
imes
++
;
zhangsan
T
imes
++
;
})
var
lisi
_t
imes
=
0
;
var
lisi
T
imes
=
0
;
ss
.
addEventListener
(
"
lisi
"
,
()
=>
{
lisi
_t
imes
++
;
lisi
T
imes
++
;
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
2
)
expect
(
zhangsan
T
imes
).
assertEqual
(
2
)
ss
.
dispatchEvent
({
type
:
"
lisi
"
})
ss
.
dispatchEvent
({
type
:
"
lisi
"
})
expect
(
lisi
_t
imes
).
assertEqual
(
2
)
expect
(
lisi
T
imes
).
assertEqual
(
2
)
ss
.
removeAllListener
()
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
ss
.
dispatchEvent
({
type
:
"
zhangsan
"
})
expect
(
zhangsan
_t
imes
).
assertEqual
(
2
)
expect
(
zhangsan
T
imes
).
assertEqual
(
2
)
ss
.
dispatchEvent
({
type
:
"
lisi
"
})
ss
.
dispatchEvent
({
type
:
"
lisi
"
})
expect
(
lisi
_t
imes
).
assertEqual
(
2
)
expect
(
lisi
T
imes
).
assertEqual
(
2
)
})
// check parentPort.close is ok
...
...
test_packages.gni
浏览文件 @
1ae3d501
...
...
@@ -25,6 +25,7 @@ _all_test_packages = [
"${ACTS_ROOT}/account:account",
"${ACTS_ROOT}/communication:communication",
"${ACTS_ROOT}/compileruntime:compileruntime",
"${ACTS_ROOT}/notification:notification",
"${ACTS_ROOT}/aafwk:aafwk",
"${ACTS_ROOT}/location:location",
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录