Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ce36daa2
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看板
提交
ce36daa2
编写于
3月 28, 2022
作者:
L
liulinna
提交者:
guduhanyan
3月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加xts时间设置权限
Signed-off-by:
N
guduhanyan
<
xuyanjun27@163.com
>
上级
c3e0b841
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
35 addition
and
29 deletion
+35
-29
miscservices/TimeTest_js/src/main/js/default/test/SystemTimeJsunit.Pertest.js
...t_js/src/main/js/default/test/SystemTimeJsunit.Pertest.js
+9
-3
miscservices/TimeTest_js/src/main/js/default/test/SystemTimeJsunit.test.js
...Test_js/src/main/js/default/test/SystemTimeJsunit.test.js
+26
-26
未找到文件。
miscservices/TimeTest_js/src/main/js/default/test/SystemTimeJsunit.Pertest.js
浏览文件 @
ce36daa2
...
...
@@ -31,13 +31,16 @@ describe('TimeTest', function() {
it
(
'
systemTime_setTime_test1
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setTime_JS_API_0100 start
"
);
systemTime
.
setTime
(
152600
,
(
err
,
data
)
=>
{
// callback形式调用异步接口
if
(
err
)
{
if
(
(
typeof
err
!==
'
undefined
'
)
&&
(
err
.
code
!==
0
)
)
{
console
.
error
(
'
SetTime failed because
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
return
;
}
console
.
info
(
'
SetTime success data :
'
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertTrue
();
done
();
return
;
});
console
.
log
(
'
SUB_systemTime_setTime_JS_API_0100 end
'
);
})
...
...
@@ -52,14 +55,17 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test1
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
SUB_systemTime_setTimezone_JS_API_0100 start
"
);
systemTime
.
setTimezone
(
'
A
nadyr, Russia
'
,
(
err
,
data
)
=>
{
// callback形式调用异步接口
if
(
err
)
{
systemTime
.
setTimezone
(
'
A
sia/Shanghai
'
,
(
err
,
data
)
=>
{
// callback形式调用异步接口
if
(
(
typeof
err
!==
'
undefined
'
)
&&
(
err
.
code
!==
0
)
)
{
console
.
error
(
'
setTimezone failed because
'
+
JSON
.
stringify
(
err
));
expect
().
assertFail
();
done
();
return
;
}
console
.
info
(
'
setTimezone success data :
'
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertTrue
();
done
();
return
;
});
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0100 end
'
);
})
...
...
miscservices/TimeTest_js/src/main/js/default/test/SystemTimeJsunit.test.js
浏览文件 @
ce36daa2
...
...
@@ -29,7 +29,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test1
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0100 start
'
)
var
timezone
=
'
An
adyr, Russia
'
var
timezone
=
'
An
tarctica/McMurdo
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -51,7 +51,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test2
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0200 start
'
)
var
timezone
=
'
Honiara, SolomonIslands
'
var
timezone
=
'
Africa/Kinshasa
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -73,7 +73,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test3
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0300 start
'
)
var
timezone
=
'
Melbourne, Austral
ia
'
var
timezone
=
'
Asia/Nicos
ia
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -95,7 +95,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test4
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0400 start
'
)
var
timezone
=
'
Tokyo, Japan
'
var
timezone
=
'
America/Guayaquil
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -117,7 +117,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test5
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0500 start
'
)
var
timezone
=
'
Beijing, China
'
var
timezone
=
'
Pacific/Pohnpei
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -139,7 +139,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test6
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0600 start
'
)
var
timezone
=
'
Jakarta, Indonesia
'
var
timezone
=
'
Asia/Almaty
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -161,7 +161,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test7
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0700 start
'
)
var
timezone
=
'
Dhaka, Bangladesh
'
var
timezone
=
'
America/Godthab
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -183,7 +183,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test8
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0800 start
'
)
var
timezone
=
'
Tashkent, Uzbekistan
'
var
timezone
=
'
Pacific/Majuro
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -205,7 +205,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test9
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_0900 start
'
)
var
timezone
=
'
Dubai, U.A.E.
'
var
timezone
=
'
Asia/Kuala_Lumpur
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -227,7 +227,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test10
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1000 start
'
)
var
timezone
=
'
Moscow, Russi
a
'
var
timezone
=
'
Asia/Gaz
a
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -249,7 +249,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test11
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1100 start
'
)
var
timezone
=
'
Brussels, Belgium
'
var
timezone
=
'
Europe/Kiev
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -271,7 +271,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test12
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1200 start
'
)
var
timezone
=
'
London, England
'
var
timezone
=
'
America/New_York
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -293,7 +293,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test13
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1300 start
'
)
var
timezone
=
'
Accra, Ghana
'
var
timezone
=
'
Pacific/Pohnpei
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -315,7 +315,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test14
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1400 start
'
)
var
timezone
=
'
Praia, CaboVerde
'
var
timezone
=
'
America/Guayaquil
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -337,7 +337,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test15
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1500 start
'
)
var
timezone
=
'
Nuuk, Green
land
'
var
timezone
=
'
Pacific/Auck
land
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -359,7 +359,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test16
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1600 start
'
)
var
timezone
=
'
Buenos Aires, Argentina
'
var
timezone
=
'
Pacific/Auckland
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -381,7 +381,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test17
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1700 start
'
)
var
timezone
=
'
New York, U.S.A.
'
var
timezone
=
'
America/Godthab
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -403,7 +403,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test18
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1800 start
'
)
var
timezone
=
'
Mexico City, Mexico
'
var
timezone
=
'
Europe/Berlin
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -425,7 +425,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test19
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_1900 start
'
)
var
timezone
=
'
Guatemala City, Guatemal
a
'
var
timezone
=
'
Asia/Jakart
a
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -447,7 +447,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test20
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_2000 start
'
)
var
timezone
=
'
Los Angeles, U.S.A.
'
var
timezone
=
'
Asia/Tashkent
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -469,7 +469,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test20
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_2000 start
'
)
var
timezone
=
'
A
nchorage, U.S.A.
'
var
timezone
=
'
A
sia/Tashkent
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -491,7 +491,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test22
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_2200 start
'
)
var
timezone
=
'
A
dak, U.S.A.
'
var
timezone
=
'
A
sia/Tashkent
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -513,7 +513,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test23
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_2300 start
'
)
var
timezone
=
'
Honolulu, U.S.A.
'
var
timezone
=
'
Pacific/Pohnpei
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -535,7 +535,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test24
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_2400 start
'
)
var
timezone
=
'
Alofi, Niue
'
var
timezone
=
'
Pacific/Pohnpei
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -557,7 +557,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test25
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_2500 start
'
)
var
timezone
=
'
Baker Island, U.S.A.
'
var
timezone
=
'
Asia/Nicosia
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
@@ -579,7 +579,7 @@ describe('TimeTest', function() {
*/
it
(
'
systemTime_setTimezone_test26
'
,
0
,
async
()
=>
{
console
.
log
(
'
SUB_systemTime_setTimezone_JS_API_2600 start
'
)
var
timezone
=
'
Baker Island, U.S.A.
'
var
timezone
=
'
Asia/Nicosia
'
console
.
log
(
'
setTimezone =
'
+
timezone
)
systemTime
.
setTimezone
(
timezone
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录