Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
acb56198
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
acb56198
编写于
11月 26, 2021
作者:
G
guduhanyan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
20211126xtsmaster00
Signed-off-by:
N
guduhanyan
<
xuyanjun27@163.com
>
上级
509b1ad2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
424 addition
and
147 deletion
+424
-147
miscservices/TimeTest_js/src/main/js/default/test/SystemTimeJsunit.test.js
...Test_js/src/main/js/default/test/SystemTimeJsunit.test.js
+75
-4
miscservices/TimeTest_js/src/main/js/default/test/Time.test.js
...ervices/TimeTest_js/src/main/js/default/test/Time.test.js
+120
-1
miscservices/TimerTest_js/src/main/js/default/test/SystemTimerJsunit.test.js
...est_js/src/main/js/default/test/SystemTimerJsunit.test.js
+229
-142
未找到文件。
miscservices/TimeTest_js/src/main/js/default/test/SystemTimeJsunit.test.js
浏览文件 @
acb56198
...
@@ -32,6 +32,7 @@ describe('TimeTest', function() {
...
@@ -32,6 +32,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
0
)
systemTime
.
setTime
(
0
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -54,6 +55,7 @@ describe('TimeTest', function() {
...
@@ -54,6 +55,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
1
)
systemTime
.
setTime
(
1
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -76,6 +78,7 @@ describe('TimeTest', function() {
...
@@ -76,6 +78,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
Number
.
MAX_VALUE
/
2
)
systemTime
.
setTime
(
Number
.
MAX_VALUE
/
2
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -98,6 +101,7 @@ describe('TimeTest', function() {
...
@@ -98,6 +101,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
Number
.
MAX_VALUE
-
1
)
systemTime
.
setTime
(
Number
.
MAX_VALUE
-
1
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -120,6 +124,7 @@ describe('TimeTest', function() {
...
@@ -120,6 +124,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
Number
.
MAX_VALUE
)
systemTime
.
setTime
(
Number
.
MAX_VALUE
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -142,6 +147,7 @@ describe('TimeTest', function() {
...
@@ -142,6 +147,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
Number
.
MIN_VALUE
)
systemTime
.
setTime
(
Number
.
MIN_VALUE
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -164,6 +170,7 @@ describe('TimeTest', function() {
...
@@ -164,6 +170,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
-
1
)
systemTime
.
setTime
(
-
1
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -186,6 +193,7 @@ describe('TimeTest', function() {
...
@@ -186,6 +193,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
-
Number
.
MIN_VALUE
)
systemTime
.
setTime
(
-
Number
.
MIN_VALUE
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -208,6 +216,7 @@ describe('TimeTest', function() {
...
@@ -208,6 +216,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
-
Number
.
MAX_VALUE
/
2
)
systemTime
.
setTime
(
-
Number
.
MAX_VALUE
/
2
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -230,6 +239,7 @@ describe('TimeTest', function() {
...
@@ -230,6 +239,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
-
Number
.
MAX_VALUE
+
1
)
systemTime
.
setTime
(
-
Number
.
MAX_VALUE
+
1
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -252,6 +262,7 @@ describe('TimeTest', function() {
...
@@ -252,6 +262,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
-
Number
.
MAX_VALUE
)
systemTime
.
setTime
(
-
Number
.
MAX_VALUE
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -274,6 +285,7 @@ describe('TimeTest', function() {
...
@@ -274,6 +285,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
Number
.
NEGATIVE_INFINITY
)
systemTime
.
setTime
(
Number
.
NEGATIVE_INFINITY
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -296,6 +308,7 @@ describe('TimeTest', function() {
...
@@ -296,6 +308,7 @@ describe('TimeTest', function() {
systemTime
.
setTime
(
Number
.
POSITIVE_INFINITY
)
systemTime
.
setTime
(
Number
.
POSITIVE_INFINITY
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===error
"
+
error
)
console
.
log
(
"
setTime ===data
"
+
data
)
console
.
log
(
"
setTime ===data
"
+
data
)
...
@@ -318,6 +331,7 @@ describe('TimeTest', function() {
...
@@ -318,6 +331,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
())
systemTime
.
setDate
(
new
Date
())
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -340,6 +354,7 @@ describe('TimeTest', function() {
...
@@ -340,6 +354,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
1
,
1
))
systemTime
.
setDate
(
new
Date
(
2022
,
1
,
1
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -362,6 +377,7 @@ describe('TimeTest', function() {
...
@@ -362,6 +377,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
1
,
15
))
systemTime
.
setDate
(
new
Date
(
2022
,
1
,
15
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -384,6 +400,7 @@ describe('TimeTest', function() {
...
@@ -384,6 +400,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
1
,
31
))
systemTime
.
setDate
(
new
Date
(
2022
,
1
,
31
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -406,6 +423,7 @@ describe('TimeTest', function() {
...
@@ -406,6 +423,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
1
,
32
))
systemTime
.
setDate
(
new
Date
(
2022
,
1
,
32
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -428,6 +446,7 @@ describe('TimeTest', function() {
...
@@ -428,6 +446,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
2
,
29
))
systemTime
.
setDate
(
new
Date
(
2022
,
2
,
29
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -450,6 +469,7 @@ describe('TimeTest', function() {
...
@@ -450,6 +469,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2040
,
2
,
29
))
systemTime
.
setDate
(
new
Date
(
2040
,
2
,
29
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -472,6 +492,7 @@ describe('TimeTest', function() {
...
@@ -472,6 +492,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2040
,
2
,
30
))
systemTime
.
setDate
(
new
Date
(
2040
,
2
,
30
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -494,6 +515,7 @@ describe('TimeTest', function() {
...
@@ -494,6 +515,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
6
,
30
))
systemTime
.
setDate
(
new
Date
(
2022
,
6
,
30
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -516,6 +538,7 @@ describe('TimeTest', function() {
...
@@ -516,6 +538,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
6
,
31
))
systemTime
.
setDate
(
new
Date
(
2022
,
6
,
31
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -538,6 +561,7 @@ describe('TimeTest', function() {
...
@@ -538,6 +561,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
12
,
31
))
systemTime
.
setDate
(
new
Date
(
2022
,
12
,
31
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -560,6 +584,7 @@ describe('TimeTest', function() {
...
@@ -560,6 +584,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022
,
13
,
1
))
systemTime
.
setDate
(
new
Date
(
2022
,
13
,
1
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -582,6 +607,7 @@ describe('TimeTest', function() {
...
@@ -582,6 +607,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
2022000
,
1
,
1
))
systemTime
.
setDate
(
new
Date
(
2022000
,
1
,
1
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -604,6 +630,7 @@ describe('TimeTest', function() {
...
@@ -604,6 +630,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
0
))
systemTime
.
setDate
(
new
Date
(
0
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -626,6 +653,7 @@ describe('TimeTest', function() {
...
@@ -626,6 +653,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
-
1
))
systemTime
.
setDate
(
new
Date
(
-
1
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -648,6 +676,7 @@ describe('TimeTest', function() {
...
@@ -648,6 +676,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
Number
.
MAX_VALUE
/
2
))
systemTime
.
setDate
(
new
Date
(
Number
.
MAX_VALUE
/
2
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -670,6 +699,7 @@ describe('TimeTest', function() {
...
@@ -670,6 +699,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
-
Number
.
MAX_VALUE
/
2
))
systemTime
.
setDate
(
new
Date
(
-
Number
.
MAX_VALUE
/
2
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -692,6 +722,7 @@ describe('TimeTest', function() {
...
@@ -692,6 +722,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
Number
.
MAX_VALUE
))
systemTime
.
setDate
(
new
Date
(
Number
.
MAX_VALUE
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -714,6 +745,7 @@ describe('TimeTest', function() {
...
@@ -714,6 +745,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
-
Number
.
MAX_VALUE
))
systemTime
.
setDate
(
new
Date
(
-
Number
.
MAX_VALUE
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -736,6 +768,7 @@ describe('TimeTest', function() {
...
@@ -736,6 +768,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
June 1, 2022 11:13:00
"
))
systemTime
.
setDate
(
new
Date
(
"
June 1, 2022 11:13:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -758,6 +791,7 @@ describe('TimeTest', function() {
...
@@ -758,6 +791,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
June 30, 2022 11:13:00
"
))
systemTime
.
setDate
(
new
Date
(
"
June 30, 2022 11:13:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -780,6 +814,7 @@ describe('TimeTest', function() {
...
@@ -780,6 +814,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
June 31, 2022 11:13:00
"
))
systemTime
.
setDate
(
new
Date
(
"
June 31, 2022 11:13:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -802,6 +837,7 @@ describe('TimeTest', function() {
...
@@ -802,6 +837,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
July 32, 2022 11:13:00
"
))
systemTime
.
setDate
(
new
Date
(
"
July 32, 2022 11:13:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -824,6 +860,7 @@ describe('TimeTest', function() {
...
@@ -824,6 +860,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
July 31, 2022
"
))
systemTime
.
setDate
(
new
Date
(
"
July 31, 2022
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -846,6 +883,7 @@ describe('TimeTest', function() {
...
@@ -846,6 +883,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 28, 2022 11:13:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 28, 2022 11:13:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -868,6 +906,7 @@ describe('TimeTest', function() {
...
@@ -868,6 +906,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 29, 2022 11:13:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 29, 2022 11:13:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -890,6 +929,7 @@ describe('TimeTest', function() {
...
@@ -890,6 +929,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 29, 2040 11:13:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 29, 2040 11:13:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -912,6 +952,7 @@ describe('TimeTest', function() {
...
@@ -912,6 +952,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 00:00:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 00:00:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -934,6 +975,7 @@ describe('TimeTest', function() {
...
@@ -934,6 +975,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:00:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:00:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -956,6 +998,7 @@ describe('TimeTest', function() {
...
@@ -956,6 +998,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 23:00:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 23:00:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -978,6 +1021,7 @@ describe('TimeTest', function() {
...
@@ -978,6 +1021,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 23:59:59
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 23:59:59
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -1000,6 +1044,7 @@ describe('TimeTest', function() {
...
@@ -1000,6 +1044,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 24:00:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 24:00:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -1022,6 +1067,7 @@ describe('TimeTest', function() {
...
@@ -1022,6 +1067,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:59:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:59:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -1044,6 +1090,7 @@ describe('TimeTest', function() {
...
@@ -1044,6 +1090,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:00:59
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:00:59
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -1066,6 +1113,7 @@ describe('TimeTest', function() {
...
@@ -1066,6 +1113,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:00:60
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:00:60
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -1088,6 +1136,7 @@ describe('TimeTest', function() {
...
@@ -1088,6 +1136,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:60:00
"
))
systemTime
.
setDate
(
new
Date
(
"
February 1, 2022 12:60:00
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -1110,6 +1159,7 @@ describe('TimeTest', function() {
...
@@ -1110,6 +1159,7 @@ describe('TimeTest', function() {
systemTime
.
setDate
(
new
Date
(
"
!!@#$%^&*
"
))
systemTime
.
setDate
(
new
Date
(
"
!!@#$%^&*
"
))
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
expect
(
false
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===error
"
+
error
)
console
.
log
(
"
setDate ===data
"
+
data
)
console
.
log
(
"
setDate ===data
"
+
data
)
...
@@ -1132,6 +1182,7 @@ describe('TimeTest', function() {
...
@@ -1132,6 +1182,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Anadyr, Russia
"
)
systemTime
.
setTimezone
(
"
Anadyr, Russia
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1154,6 +1205,7 @@ describe('TimeTest', function() {
...
@@ -1154,6 +1205,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Honiara, SolomonIslands
"
)
systemTime
.
setTimezone
(
"
Honiara, SolomonIslands
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1176,6 +1228,7 @@ describe('TimeTest', function() {
...
@@ -1176,6 +1228,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Melbourne, Australia
"
)
systemTime
.
setTimezone
(
"
Melbourne, Australia
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1198,6 +1251,7 @@ describe('TimeTest', function() {
...
@@ -1198,6 +1251,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Tokyo, Japan
"
)
systemTime
.
setTimezone
(
"
Tokyo, Japan
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1220,6 +1274,7 @@ describe('TimeTest', function() {
...
@@ -1220,6 +1274,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Beijing, China
"
)
systemTime
.
setTimezone
(
"
Beijing, China
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1242,6 +1297,7 @@ describe('TimeTest', function() {
...
@@ -1242,6 +1297,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Jakarta, Indonesia
"
)
systemTime
.
setTimezone
(
"
Jakarta, Indonesia
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1264,6 +1320,7 @@ describe('TimeTest', function() {
...
@@ -1264,6 +1320,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Dhaka, Bangladesh
"
)
systemTime
.
setTimezone
(
"
Dhaka, Bangladesh
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1286,6 +1343,7 @@ describe('TimeTest', function() {
...
@@ -1286,6 +1343,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Tashkent, Uzbekistan
"
)
systemTime
.
setTimezone
(
"
Tashkent, Uzbekistan
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1308,6 +1366,7 @@ describe('TimeTest', function() {
...
@@ -1308,6 +1366,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Dubai, U.A.E.
"
)
systemTime
.
setTimezone
(
"
Dubai, U.A.E.
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1330,6 +1389,7 @@ describe('TimeTest', function() {
...
@@ -1330,6 +1389,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Moscow, Russia
"
)
systemTime
.
setTimezone
(
"
Moscow, Russia
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1352,6 +1412,7 @@ describe('TimeTest', function() {
...
@@ -1352,6 +1412,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Brussels, Belgium
"
)
systemTime
.
setTimezone
(
"
Brussels, Belgium
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1374,6 +1435,7 @@ describe('TimeTest', function() {
...
@@ -1374,6 +1435,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
London, England
"
)
systemTime
.
setTimezone
(
"
London, England
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1396,6 +1458,7 @@ describe('TimeTest', function() {
...
@@ -1396,6 +1458,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Accra, Ghana
"
)
systemTime
.
setTimezone
(
"
Accra, Ghana
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1418,6 +1481,7 @@ describe('TimeTest', function() {
...
@@ -1418,6 +1481,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Praia, CaboVerde
"
)
systemTime
.
setTimezone
(
"
Praia, CaboVerde
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1440,6 +1504,7 @@ describe('TimeTest', function() {
...
@@ -1440,6 +1504,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Nuuk, Greenland
"
)
systemTime
.
setTimezone
(
"
Nuuk, Greenland
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1462,6 +1527,7 @@ describe('TimeTest', function() {
...
@@ -1462,6 +1527,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Buenos Aires, Argentina
"
)
systemTime
.
setTimezone
(
"
Buenos Aires, Argentina
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1484,6 +1550,7 @@ describe('TimeTest', function() {
...
@@ -1484,6 +1550,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
New York, U.S.A.
"
)
systemTime
.
setTimezone
(
"
New York, U.S.A.
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1506,6 +1573,7 @@ describe('TimeTest', function() {
...
@@ -1506,6 +1573,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Mexico City, Mexico
"
)
systemTime
.
setTimezone
(
"
Mexico City, Mexico
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1528,6 +1596,7 @@ describe('TimeTest', function() {
...
@@ -1528,6 +1596,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Guatemala City, Guatemala
"
)
systemTime
.
setTimezone
(
"
Guatemala City, Guatemala
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1550,6 +1619,7 @@ describe('TimeTest', function() {
...
@@ -1550,6 +1619,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Los Angeles, U.S.A.
"
)
systemTime
.
setTimezone
(
"
Los Angeles, U.S.A.
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1572,6 +1642,7 @@ describe('TimeTest', function() {
...
@@ -1572,6 +1642,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Anchorage, U.S.A.
"
)
systemTime
.
setTimezone
(
"
Anchorage, U.S.A.
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1594,6 +1665,7 @@ describe('TimeTest', function() {
...
@@ -1594,6 +1665,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Adak, U.S.A.
"
)
systemTime
.
setTimezone
(
"
Adak, U.S.A.
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1616,6 +1688,7 @@ describe('TimeTest', function() {
...
@@ -1616,6 +1688,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Honolulu, U.S.A.
"
)
systemTime
.
setTimezone
(
"
Honolulu, U.S.A.
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1638,6 +1711,7 @@ describe('TimeTest', function() {
...
@@ -1638,6 +1711,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Alofi, Niue
"
)
systemTime
.
setTimezone
(
"
Alofi, Niue
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1660,6 +1734,7 @@ describe('TimeTest', function() {
...
@@ -1660,6 +1734,7 @@ describe('TimeTest', function() {
systemTime
.
setTimezone
(
"
Baker Island, U.S.A.
"
)
systemTime
.
setTimezone
(
"
Baker Island, U.S.A.
"
)
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
expect
(
true
).
to
.
a
(
'
boolean
'
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===error
"
+
error
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
...
@@ -1745,11 +1820,7 @@ describe('TimeTest', function() {
...
@@ -1745,11 +1820,7 @@ describe('TimeTest', function() {
*/
*/
it
(
'
systemTime_setTimezone_test29
'
,
0
,
async
function
(
done
)
{
it
(
'
systemTime_setTimezone_test29
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setTimezone_JS_API_2900 start
"
)
console
.
log
(
"
SUB_systemTime_setTimezone_JS_API_2900 start
"
)
<<<<<<<
HEAD
systemTime
.
setTimezone
(
"
AAAAAAAAAAAAAAAAAAAAAAAAAA
"
)
=======
systemTime
.
setTimezone
(
"
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
"
)
systemTime
.
setTimezone
(
"
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
"
)
>>>>>>>
67
cddaeb9d46468d0842acd9543d07c76b15457e
.
then
(
data
=>
{
.
then
(
data
=>
{
console
.
log
(
"
setTimezone ===data
"
+
data
)
console
.
log
(
"
setTimezone ===data
"
+
data
)
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
...
...
miscservices/TimeTest_js/src/main/js/default/test/Time.test.js
浏览文件 @
acb56198
...
@@ -17,8 +17,9 @@
...
@@ -17,8 +17,9 @@
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
systemTime
from
'
@ohos.systemTime
'
import
systemTime
from
'
@ohos.systemTime
'
describe
(
'
TimeTest
'
,
function
()
{
describe
(
'
TimeTest
'
,
function
(){
console
.
log
(
'
start################################start
'
);
console
.
log
(
'
start################################start
'
);
/**
/**
* @tc.number SUB_systemTime_setTime_JS_API_0100
* @tc.number SUB_systemTime_setTime_JS_API_0100
* @tc.name Test systemTime.setTime
* @tc.name Test systemTime.setTime
...
@@ -103,4 +104,122 @@ describe('TimeTest', function() {
...
@@ -103,4 +104,122 @@ describe('TimeTest', function() {
console
.
log
(
'
SUB_systemTime_setTime_JS_API_0400 end
'
);
console
.
log
(
'
SUB_systemTime_setTime_JS_API_0400 end
'
);
done
()
done
()
})
})
/**
* @tc.number SUB_systemTime_setDate_JS_API_0100
* @tc.name Test systemTime.setDate Invalid value
* @tc.desc Test systemTime_setDate API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
systemTime_setDate_test1
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setDate_JS_API_0100 start
"
);
var
data
=
new
Date
(
"
October 13, 2020 11:13:00
"
);
systemTime
.
setDate
(
-
1
).
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
);
done
();
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
);
done
();
});
});
/**
* @tc.number SUB_systemTime_setDate_JS_API_0200
* @tc.name Test systemTime.setDate Invalid value
* @tc.desc Test systemTime_setDate API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
systemTime_setDate_test2
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setDate_JS_API_0200 start
"
);
systemTime
.
setDate
(
0
).
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
);
done
();
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
);
done
();
});
});
/**
* @tc.number SUB_systemTime_setDate_JS_API_0300
* @tc.name Test systemTime.setDate Invalid value
* @tc.desc Test systemTime_setDate API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
systemTime_setDate_test3
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setDate_JS_API_0300 start
"
);
var
data
=
new
Date
(
"
October 13, 2020 11:13:00
"
);
systemTime
.
setDate
(
data
,
(
error
,
data
)
=>
{
if
(
error
){
console
.
log
(
"
setTime ===error
"
+
error
);
done
();
}
else
{
console
.
log
(
"
setTime ===data
"
+
data
);
done
();
}
});
});
/**
* @tc.number SUB_systemTime_setTimezone_JS_API_0100
* @tc.name Test systemTime.setTimezone Invalid value
* @tc.desc Test systemTime_setTimezone API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
systemTime_setTimezone_test1
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setTimezone_JS_API_0100 start
"
);
systemTime
.
setTimezone
(
'
Asia, Shanghai
'
).
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
done
();
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
done
();
});
});
/**
* @tc.number SUB_systemTime_setTimezone_JS_API_0200
* @tc.name Test systemTime.setTimezone Invalid value
* @tc.desc Test systemTime_setTimezone API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
systemTime_setTimezone_test1
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setTimezone_JS_API_0100 start
"
);
systemTime
.
setTimezone
(
'
Beijing,China
'
).
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
done
();
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
done
();
});
});
/**
* @tc.number SUB_systemTime_setTimezone_JS_API_0300
* @tc.name Test systemTime.setTimezone Invalid value
* @tc.desc Test systemTime_setTimezone API functionality.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
systemTime_setTimezone_test1
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setTimezone_JS_API_0100 start
"
);
systemTime
.
setTimezone
(
'
Baker Island, U.S.A.
'
).
then
(
data
=>
{
console
.
log
(
"
setTime ===data
"
+
data
)
done
();
}).
catch
(
error
=>
{
console
.
log
(
"
setTime ===error
"
+
error
)
done
();
});
});
})
})
miscservices/TimerTest_js/src/main/js/default/test/SystemTimerJsunit.test.js
浏览文件 @
acb56198
...
@@ -22,7 +22,7 @@ describe('TimerTest', function() {
...
@@ -22,7 +22,7 @@ describe('TimerTest', function() {
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0100
* @tc.number SUB_systemTimer_Timer_JS_API_0100
* @tc.name Test systemTimer.Timer type = TIMER_TYPE_REALTIME
* @tc.name Test systemTimer.
create
Timer type = TIMER_TYPE_REALTIME
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -36,23 +36,26 @@ describe('TimerTest', function() {
...
@@ -36,23 +36,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0100 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0100 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0200
* @tc.number SUB_systemTimer_Timer_JS_API_0200
* @tc.name Test systemTimer.Timer type = TIMER_TYPE_REALTIME_WAKEUP
* @tc.name Test systemTimer.
create
Timer type = TIMER_TYPE_REALTIME_WAKEUP
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -66,23 +69,26 @@ describe('TimerTest', function() {
...
@@ -66,23 +69,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0200 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0200 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0300
* @tc.number SUB_systemTimer_Timer_JS_API_0300
* @tc.name Test systemTimer.Timer type = TIMER_TYPE_EXACT
* @tc.name Test systemTimer.
create
Timer type = TIMER_TYPE_EXACT
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -96,23 +102,26 @@ describe('TimerTest', function() {
...
@@ -96,23 +102,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0300 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0300 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0400
* @tc.number SUB_systemTimer_Timer_JS_API_0400
* @tc.name Test systemTimer.Timer type = TIMER_TYPE_REALTIME
* @tc.name Test systemTimer.
create
Timer type = TIMER_TYPE_REALTIME
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -126,23 +135,26 @@ describe('TimerTest', function() {
...
@@ -126,23 +135,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0400 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0400 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0500
* @tc.number SUB_systemTimer_Timer_JS_API_0500
* @tc.name Test systemTimer.Timer triggerTime = 0
* @tc.name Test systemTimer.
create
Timer triggerTime = 0
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -156,23 +168,26 @@ describe('TimerTest', function() {
...
@@ -156,23 +168,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
0
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
0
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0500 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0500 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0600
* @tc.number SUB_systemTimer_Timer_JS_API_0600
* @tc.name Test systemTimer.Timer triggerTime = 5000
* @tc.name Test systemTimer.
create
Timer triggerTime = 5000
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -186,23 +201,26 @@ describe('TimerTest', function() {
...
@@ -186,23 +201,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
5000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
5000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0600 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0600 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0700
* @tc.number SUB_systemTimer_Timer_JS_API_0700
* @tc.name Test systemTimer.Timer triggerTime = Number.MAX_VALUE/2
* @tc.name Test systemTimer.
create
Timer triggerTime = Number.MAX_VALUE/2
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -216,23 +234,26 @@ describe('TimerTest', function() {
...
@@ -216,23 +234,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
Number
.
MAX_VALUE
/
2
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
Number
.
MAX_VALUE
/
2
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0700 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0700 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0800
* @tc.number SUB_systemTimer_Timer_JS_API_0800
* @tc.name Test systemTimer.Timer triggerTime = Number.MAX_VALUE-1
* @tc.name Test systemTimer.
create
Timer triggerTime = Number.MAX_VALUE-1
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -246,23 +267,26 @@ describe('TimerTest', function() {
...
@@ -246,23 +267,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
Number
.
MAX_VALUE
-
1
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
Number
.
MAX_VALUE
-
1
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0800 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0800 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_0900
* @tc.number SUB_systemTimer_Timer_JS_API_0900
* @tc.name Test systemTimer.Timer triggerTime = Number.MAX_VALUE
* @tc.name Test systemTimer.
create
Timer triggerTime = Number.MAX_VALUE
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -276,23 +300,26 @@ describe('TimerTest', function() {
...
@@ -276,23 +300,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
Number
.
MAX_VALUE
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
Number
.
MAX_VALUE
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
ystemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0900 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_0900 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1000
* @tc.number SUB_systemTimer_Timer_JS_API_1000
* @tc.name Test systemTimer.Timer repeat = true
* @tc.name Test systemTimer.
create
Timer repeat = true
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -306,23 +333,26 @@ describe('TimerTest', function() {
...
@@ -306,23 +333,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1000 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1000 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1100
* @tc.number SUB_systemTimer_Timer_JS_API_1100
* @tc.name Test systemTimer.Timer persistent = true
* @tc.name Test systemTimer.
create
Timer persistent = true
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -336,23 +366,26 @@ describe('TimerTest', function() {
...
@@ -336,23 +366,26 @@ describe('TimerTest', function() {
persistent
:
true
persistent
:
true
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1100 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1100 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1200
* @tc.number SUB_systemTimer_Timer_JS_API_1200
* @tc.name Test systemTimer.Timer repeat,persistent = true
* @tc.name Test systemTimer.
create
Timer repeat,persistent = true
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -366,23 +399,26 @@ describe('TimerTest', function() {
...
@@ -366,23 +399,26 @@ describe('TimerTest', function() {
persistent
:
true
persistent
:
true
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1200 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1200 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1300
* @tc.number SUB_systemTimer_Timer_JS_API_1300
* @tc.name Test systemTimer.Timer create,start,stop,destroy 1000 timers
* @tc.name Test systemTimer.
create
Timer create,start,stop,destroy 1000 timers
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -398,24 +434,27 @@ describe('TimerTest', function() {
...
@@ -398,24 +434,27 @@ describe('TimerTest', function() {
for
(
var
index
=
0
;
index
<
1000
;
index
++
)
for
(
var
index
=
0
;
index
<
1000
;
index
++
)
{
{
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1300 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1300 end
'
);
}
}
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1400
* @tc.number SUB_systemTimer_Timer_JS_API_1400
* @tc.name Test systemTimer.Timer interval = 0
* @tc.name Test systemTimer.
create
Timer interval = 0
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -430,23 +469,26 @@ describe('TimerTest', function() {
...
@@ -430,23 +469,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1400 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1400 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1500
* @tc.number SUB_systemTimer_Timer_JS_API_1500
* @tc.name Test systemTimer.Timer interval = 5000
* @tc.name Test systemTimer.
create
Timer interval = 5000
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -461,23 +503,26 @@ describe('TimerTest', function() {
...
@@ -461,23 +503,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1500 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1500 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1600
* @tc.number SUB_systemTimer_Timer_JS_API_1600
* @tc.name Test systemTimer.Timer interval = Number.MAX_VALUE/2
* @tc.name Test systemTimer.
create
Timer interval = Number.MAX_VALUE/2
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -492,23 +537,26 @@ describe('TimerTest', function() {
...
@@ -492,23 +537,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1600 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1600 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1700
* @tc.number SUB_systemTimer_Timer_JS_API_1700
* @tc.name Test systemTimer.Timer interval = Number.MAX_VALUE-1
* @tc.name Test systemTimer.
create
Timer interval = Number.MAX_VALUE-1
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -523,23 +571,26 @@ describe('TimerTest', function() {
...
@@ -523,23 +571,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1700 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1700 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1800
* @tc.number SUB_systemTimer_Timer_JS_API_1800
* @tc.name Test systemTimer.Timer interval = Number.MAX_VALUE
* @tc.name Test systemTimer.
create
Timer interval = Number.MAX_VALUE
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -554,23 +605,26 @@ describe('TimerTest', function() {
...
@@ -554,23 +605,26 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1800 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1800 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_1900
* @tc.number SUB_systemTimer_Timer_JS_API_1900
* @tc.name Test systemTimer.Timer WantAgent
* @tc.name Test systemTimer.
create
Timer WantAgent
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -583,25 +637,29 @@ describe('TimerTest', function() {
...
@@ -583,25 +637,29 @@ describe('TimerTest', function() {
repeat
:
false
,
repeat
:
false
,
interval
:
100000
,
interval
:
100000
,
persistent
:
false
persistent
:
false
//wantAgent:WantAgent
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1900 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_1900 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2000
* @tc.number SUB_systemTimer_Timer_JS_API_2000
* @tc.name Test systemTimer.Timer Called back when the timer goes off.
* @tc.name Test systemTimer.
create
Timer Called back when the timer goes off.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -617,23 +675,26 @@ describe('TimerTest', function() {
...
@@ -617,23 +675,26 @@ describe('TimerTest', function() {
callback
:
callbackFunction
callback
:
callbackFunction
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2000 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2000 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2100
* @tc.number SUB_systemTimer_Timer_JS_API_2100
* @tc.name Test systemTimer.Timer start a not exist timer
* @tc.name Test systemTimer.
create
Timer start a not exist timer
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -647,20 +708,22 @@ describe('TimerTest', function() {
...
@@ -647,20 +708,22 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start a not exist timer
"
)
console
.
log
(
"
start a not exist timer
"
)
systemTimer
.
startTimer
(
timer
+
1
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
+
1
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
false
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2100 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2100 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2200
* @tc.number SUB_systemTimer_Timer_JS_API_2200
* @tc.name Test systemTimer.Timer stop a not exist timer
* @tc.name Test systemTimer.
create
Timer stop a not exist timer
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -674,26 +737,30 @@ describe('TimerTest', function() {
...
@@ -674,26 +737,30 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop a not exist timer
"
)
console
.
log
(
"
stop a not exist timer
"
)
systemTimer
.
stopTimer
(
timer
+
1
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
+
1
)
expect
(
stopTimerRes
).
assertEqual
(
false
)
console
.
log
(
"
stop the current timer
"
)
console
.
log
(
"
stop the current timer
"
)
systemTimer
.
stopTimer
(
timer
)
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2200 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2200 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2300
* @tc.number SUB_systemTimer_Timer_JS_API_2300
* @tc.name Test systemTimer.Timer destroy a not exist timer
* @tc.name Test systemTimer.
create
Timer destroy a not exist timer
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -707,26 +774,30 @@ describe('TimerTest', function() {
...
@@ -707,26 +774,30 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy a not exist timer
"
)
console
.
log
(
"
destroy a not exist timer
"
)
systemTimer
.
destroyTimer
(
timer
+
1
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
+
1
)
expect
(
destroyTimerRes
).
assertEqual
(
false
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2300 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2300 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2400
* @tc.number SUB_systemTimer_Timer_JS_API_2400
* @tc.name Test systemTimer.Timer stop a not started timer
* @tc.name Test systemTimer.
create
Timer stop a not started timer
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -740,20 +811,22 @@ describe('TimerTest', function() {
...
@@ -740,20 +811,22 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
stop a not started timer
"
)
console
.
log
(
"
stop a not started timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
false
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2400 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2400 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2500
* @tc.number SUB_systemTimer_Timer_JS_API_2500
* @tc.name Test systemTimer.Timer destroy a started timer
* @tc.name Test systemTimer.
create
Timer destroy a started timer
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -767,20 +840,22 @@ describe('TimerTest', function() {
...
@@ -767,20 +840,22 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy a started timer
"
)
console
.
log
(
"
destroy a started timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2500 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2500 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2600
* @tc.number SUB_systemTimer_Timer_JS_API_2600
* @tc.name Test systemTimer.Timer repeat to start a timer
* @tc.name Test systemTimer.
create
Timer repeat to start a timer
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -794,26 +869,30 @@ describe('TimerTest', function() {
...
@@ -794,26 +869,30 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
start timer again
"
)
console
.
log
(
"
start timer again
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2600 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2600 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2700
* @tc.number SUB_systemTimer_Timer_JS_API_2700
* @tc.name Test systemTimer.Timer repeat to stop a timer
* @tc.name Test systemTimer.
create
Timer repeat to stop a timer
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -827,26 +906,30 @@ describe('TimerTest', function() {
...
@@ -827,26 +906,30 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer again
"
)
console
.
log
(
"
stop timer again
"
)
systemTimer
.
stopTimer
(
timer
)
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2700 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2700 end
'
);
});
});
/**
/**
* @tc.number SUB_systemTimer_Timer_JS_API_2800
* @tc.number SUB_systemTimer_Timer_JS_API_2800
* @tc.name Test systemTimer.Timer repeat to destroy a timer
* @tc.name Test systemTimer.
create
Timer repeat to destroy a timer
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.desc Test systemTimer_Timer API functionality.
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
...
@@ -860,20 +943,24 @@ describe('TimerTest', function() {
...
@@ -860,20 +943,24 @@ describe('TimerTest', function() {
persistent
:
false
persistent
:
false
}
}
console
.
log
(
"
create timer
"
)
console
.
log
(
"
create timer
"
)
let
timer
=
systemTimer
.
Timer
(
options
)
let
timer
=
systemTimer
.
create
Timer
(
options
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
expect
(
parseInt
(
timer
)
==
parseFloat
(
timer
)).
assertEqual
(
true
)
console
.
log
(
"
start timer
"
)
console
.
log
(
"
start timer
"
)
systemTimer
.
startTimer
(
timer
,
100000
)
let
startTimerRes
=
systemTimer
.
startTimer
(
timer
,
100000
)
expect
(
startTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
stop timer
"
)
console
.
log
(
"
stop timer
"
)
systemTimer
.
stopTimer
(
timer
)
let
stopTimerRes
=
systemTimer
.
stopTimer
(
timer
)
expect
(
stopTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer
"
)
console
.
log
(
"
destroy timer
"
)
systemTimer
.
destroyTimer
(
timer
)
let
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
true
)
console
.
log
(
"
destroy timer again
"
)
console
.
log
(
"
destroy timer again
"
)
systemTimer
.
destroyTimer
(
timer
)
destroyTimerRes
=
systemTimer
.
destroyTimer
(
timer
)
expect
(
destroyTimerRes
).
assertEqual
(
false
)
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2800 end
'
);
console
.
log
(
'
SUB_systemTimer_Timer_JS_API_2800 end
'
);
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录