Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5ba9d170
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看板
提交
5ba9d170
编写于
11月 28, 2021
作者:
O
openharmony_ci
提交者:
Gitee
11月 28, 2021
浏览文件
操作
浏览文件
下载
差异文件
!1223 增加timer wakeup和idle类型测试用例
Merge pull request !1223 from guduhanyan/OpenHarmony-3.0-LTS
上级
f6907c15
8e3750d5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
69 addition
and
0 deletion
+69
-0
miscservices/TimerTest_js/src/main/js/default/test/SystemTimerJsunit.test.js
...est_js/src/main/js/default/test/SystemTimerJsunit.test.js
+69
-0
未找到文件。
miscservices/TimerTest_js/src/main/js/default/test/SystemTimerJsunit.test.js
浏览文件 @
5ba9d170
...
...
@@ -963,6 +963,75 @@ describe('TimerTest', function() {
expect
(
destroyTimerRes
).
assertEqual
(
false
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2800 end
'
);
});
#
if
0
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2900
* @tc.name Test systemTimer.Timer type = TIMER_TYPE_IDLE
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
systemTimer_Timer_test29
'
,
0
,
async
()
=>
{
console
.
log
(
"
SUB_systemTimer_Timer_JS_API_2900 start
"
)
var
options
=
{
type
:
TIMER_TYPE_IDLE
,
repeat
:
false
,
persistent
:
false
}
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
createTimer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2900 end
'
);
});
#
endif
/**
* @tc.number SUB_systemTimer_Timer_JS_API_3000
* @tc.name Test systemTimer.Timer type = TIMER_TYPE_WEAKUP
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
systemTimer_Timer_test30
'
,
0
,
async
()
=>
{
console
.
log
(
"
SUB_systemTimer_Timer_JS_API_3000 start
"
)
var
options
=
{
type
:
TIMER_TYPE_WEAKUP
,
repeat
:
false
,
persistent
:
false
}
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
createTimer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_3000 end
'
);
});
/**
* @function Used for callback functions
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录