Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
490e6064
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看板
提交
490e6064
编写于
10月 09, 2021
作者:
L
limeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化用例
Signed-off-by:
N
limeng
<
limeng151@huawei.com
>
Change-Id: I686fbd114982de0dd823dc6af7afe4309bddffd7
上级
b55d8074
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
43 addition
and
79 deletion
+43
-79
startup/startup_standard/src/main/js/default/test/ParametersJsUnit.test.js
...tandard/src/main/js/default/test/ParametersJsUnit.test.js
+43
-79
未找到文件。
startup/startup_standard/src/main/js/default/test/ParametersJsUnit.test.js
浏览文件 @
490e6064
...
...
@@ -39,6 +39,7 @@ describe('SystemParameterTest', function () {
if
(
err
==
undefined
)
{
ret
=
true
;
console
.
info
(
'
system_parameter_test_0100 set callback hw_sc.build.os.version value success
'
);
expect
(
ret
).
assertTrue
();
}
else
{
console
.
info
(
'
system_parameter_test_0100 set callback hw_sc.build.os.version value err:
'
+
err
.
code
);
...
...
@@ -48,9 +49,6 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0100 set callback hw_sc.build.os.version unexpect err:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0100 : end
'
);
})
...
...
@@ -74,12 +72,10 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
ret
=
true
;
console
.
info
(
'
system_parameter_test_0110 set callback hw_sc.build.os.version unexpect err:
'
+
err
)
console
.
info
(
'
system_parameter_test_0110 set callback hw_sc.build.os.version unexpect err:
'
+
err
);
expect
(
ret
).
assertTrue
();
done
();
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0110 : end
'
);
})
...
...
@@ -99,6 +95,7 @@ describe('SystemParameterTest', function () {
ret
=
true
;
console
.
info
(
'
system_parameter_test_0120 set callback hw_sc.build.os.version value err:
'
+
err
.
code
);
expect
(
ret
).
assertTrue
();
done
();
}
});
...
...
@@ -106,9 +103,6 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0120 set callback hw_sc.build.os.version unexpect err:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0120 : end
'
);
})
...
...
@@ -125,6 +119,7 @@ describe('SystemParameterTest', function () {
parameterInfo
.
then
(
function
(
value
)
{
console
.
info
(
'
system_parameter_test_0200 promise set hw_sc.build.os.version success:
'
+
value
);
ret
=
true
;
expect
(
ret
).
assertTrue
();
done
();
}).
catch
(
function
(
err
)
{
console
.
info
(
'
system_parameter_test_0200 promise set hw_sc.build.os.version error:
'
+
err
.
code
);
...
...
@@ -132,10 +127,6 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0200 set callback hw_sc.build.os.version unexpect err:
'
+
err
)
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0200 : end
'
);
})
...
...
@@ -154,14 +145,12 @@ describe('SystemParameterTest', function () {
}).
catch
(
function
(
err
)
{
ret
=
true
;
console
.
info
(
'
system_parameter_test_0220 promise set hw_sc.build.os.version error:
'
+
err
.
code
);
expect
(
ret
).
assertTrue
();
done
();
});
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0220 set callback hw_sc.build.os.version unexpect err:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0220 : end
'
);
})
...
...
@@ -183,11 +172,9 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
ret
=
true
;
console
.
info
(
'
system_parameter_test_0230 set callback hw_sc.build.os.version unexpect err:
'
+
err
);
expect
(
ret
).
assertTrue
();
done
();
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0230 : end
'
);
})
...
...
@@ -232,15 +219,13 @@ describe('SystemParameterTest', function () {
}
else
{
console
.
info
(
'
system_parameter_test_0310 promise setSync hw_sc.build.os.version:
'
+
sysValue
);
ret
=
true
;
expect
(
ret
).
assertTrue
();
done
();
}
})
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0310 promise setSync hw_sc.build.os.version:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0310 : end
'
);
})
...
...
@@ -283,6 +268,7 @@ describe('SystemParameterTest', function () {
if
(
sysValue
===
'
'
)
{
console
.
info
(
'
system_parameter_test_0340 promise get rhw_sc.build.os.version :
'
+
sysValue
);
ret
=
true
;
expect
(
ret
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
system_parameter_test_0340 promise get hw_sc.build.os.version:
'
+
sysValue
);
...
...
@@ -292,9 +278,6 @@ describe('SystemParameterTest', function () {
ret
=
true
;
console
.
info
(
'
promise get hw_sc.build.os.version:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0340 : end
'
);
})
...
...
@@ -311,6 +294,7 @@ describe('SystemParameterTest', function () {
parameterInfo
.
then
(
function
(
value
)
{
ret
=
true
;
console
.
info
(
'
system_parameter_test_0400 promise get hw_sc.build.os.version success:
'
+
value
);
expect
(
ret
).
assertTrue
();
done
();
}).
catch
(
function
(
err
)
{
console
.
info
(
'
system_parameter_test_0400 promise get hw_sc.build.os.version error:
'
+
err
.
code
);
...
...
@@ -318,9 +302,7 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0400 promise setSync hw_sc.build.os.version error:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0400 : end
'
);
})
...
...
@@ -345,6 +327,8 @@ describe('SystemParameterTest', function () {
parameterInfo
.
then
(
function
(
value
)
{
if
(
value
===
'
1.1.1.1
'
)
{
console
.
info
(
'
system_parameter_test_0410 promise get hw_sc.build.os.version success:
'
+
value
);
ret
=
true
;
expect
(
ret
).
assertTrue
();
done
();
}
}).
catch
(
function
(
err
)
{
...
...
@@ -353,9 +337,7 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0400 promise get shw_sc.build.os.version error:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0400 : end
'
);
})
...
...
@@ -379,23 +361,20 @@ describe('SystemParameterTest', function () {
let
parameter
=
systemparameter
.
get
(
'
hw_sc.build.os.version
'
,
'
10.3.4.5.63
'
);
parameter
.
then
(
function
(
value
)
{
sysValue
=
value
;
if
(
sysValue
===
'
1
0.3.4.5.63
'
)
{
if
(
sysValue
===
'
1
.1.1.1
'
)
{
ret
=
true
;
console
.
info
(
'
system_parameter_test_0420 promise get hw_sc.build.os.version success:
'
+
value
);
expect
(
ret
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
system_parameter_test_0420 promise get hw_sc.build.os.version faile
'
+
value
);
}
}).
catch
(
function
(
err
)
{
console
.
info
(
'
system_parameter_test_0420 promise get hw_sc.build.os.version error:
'
+
err
.
code
);
});
done
();
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0420 promise get hw_sc.build.os.version error:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0420 : end
'
);
})
...
...
@@ -412,6 +391,7 @@ describe('SystemParameterTest', function () {
if
(
err
==
undefined
)
{
console
.
info
(
'
system_parameter_test_0430 promise success:
'
+
data
);
ret
=
true
;
expect
(
ret
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
system_parameter_test_0430 promise get faile
'
+
err
);
...
...
@@ -421,9 +401,7 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0430 promise catch get failed
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0430 : end
'
);
})
...
...
@@ -435,23 +413,19 @@ describe('SystemParameterTest', function () {
it
(
'
system_parameter_test_0440
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_0440 start
'
);
let
ret
=
false
;
let
sysValue
=
0
;
try
{
let
parameter
=
systemparameter
.
get
(
'
hw_sc.build.os.version
'
,
'
10.3.4.5.63
'
);
let
parameter
=
systemparameter
.
get
(
'
c.c.c.c
'
,
'
10.3.4.5.63
'
);
parameter
.
then
(
function
(
value
)
{
sysValue
=
value
;
ret
=
true
;
console
.
info
(
'
system_parameter_test_0440 promise get hw_sc.build.os.version success:
'
+
value
);
expect
(
ret
).
assertTrue
();
done
();
}).
catch
(
function
(
err
)
{
console
.
info
(
'
system_parameter_test_0440 promise get hw_sc.build.os.version error:
'
+
err
.
code
);
});
done
();
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0440 promise setSync hw_sc.build.os.version:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0440 : end
'
);
})
...
...
@@ -470,14 +444,13 @@ describe('SystemParameterTest', function () {
}).
catch
(
function
(
err
)
{
ret
=
true
;
console
.
info
(
'
system_parameter_test_0450 promise get a.b.b.c error:
'
+
err
.
code
);
expect
(
ret
).
assertTrue
();
done
();
});
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0450 promise setSync a.b.b.c error:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0450 : end
'
);
})
...
...
@@ -486,26 +459,23 @@ describe('SystemParameterTest', function () {
* @tc.name testGet0500
* @tc.desc Get a property key value
*/
it
(
'
system_parameter_test_0500
'
,
0
,
function
(
done
)
{
it
(
'
system_parameter_test_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_0500 start
'
);
let
ret
=
false
;
try
{
systemparameter
.
get
(
'
hw_sc.build.os.version
'
,
async
function
(
err
,
data
)
{
systemparameter
.
get
(
'
hw_sc.build.os.version
'
,
(
err
,
data
)
=>
{
if
(
err
==
undefined
)
{
console
.
log
(
'
system_parameter_test_0500 get test.parameter.key value success:
'
+
data
);
ret
=
ture
;
expect
(
ret
).
assertTrue
();
done
();
}
else
{
console
.
log
(
'
system_parameter_test_0500 get test.parameter.key value err:
'
+
err
.
code
)
}
});
done
();
}
catch
(
err
)
{
console
.
log
(
'
system_parameter_test_0500 get unexpected error:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0500 : end
'
);
})
...
...
@@ -528,6 +498,7 @@ describe('SystemParameterTest', function () {
if
(
err
==
undefined
)
{
console
.
info
(
'
system_parameter_test_0510 get aaaaa sucess :
'
+
data
);
ret
=
true
;
expect
(
ret
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
system_parameter_test_0510 get aaaaa failed :
'
+
err
.
code
);
...
...
@@ -536,9 +507,7 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0510 promise get input error:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0510 : end
'
);
})
...
...
@@ -555,6 +524,7 @@ describe('SystemParameterTest', function () {
if
(
err
==
undefined
)
{
console
.
info
(
'
system_parameter_test_0520 get systemparameter sucess:
'
+
data
);
ret
=
true
;
expect
(
ret
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
system_parameter_test_0520 get systemparameter sucess:
'
+
err
.
code
);
...
...
@@ -563,9 +533,6 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0520 promise get input error:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0520 : end
'
);
})
...
...
@@ -582,6 +549,7 @@ describe('SystemParameterTest', function () {
if
(
err
==
undefined
)
{
console
.
info
(
'
system_parameter_test_0530 get systemparameter sucess:
'
+
data
);
ret
=
true
;
expect
(
ret
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
system_parameter_test_0530 get systemparameter sucess:
'
+
err
.
code
);
...
...
@@ -590,9 +558,6 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0530 promise get input error:
'
+
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0530 : end
'
);
})
...
...
@@ -610,6 +575,7 @@ describe('SystemParameterTest', function () {
ret
=
true
;
console
.
info
(
'
system_parameter_test_0600 get systemparameter hw_sc.build.os.version sucess:
'
+
data
);
expect
(
ret
).
assertTrue
();
done
();
}
else
{
console
.
info
(
'
system_parameter_test_0600 get systemparameter hw_sc.build.os.version failed:
'
...
...
@@ -619,9 +585,7 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0600 get systemparameter hw_sc.build.os.version abnormal:
'
,
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0610 : end
'
);
})
...
...
@@ -647,10 +611,10 @@ describe('SystemParameterTest', function () {
ret
=
true
;
console
.
info
(
'
system_parameter_test_0610 get systemparameter hw_sc.build.os.version abnormal:
'
,
err
);
done
();
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
}
console
.
info
(
'
system_parameter_test_0610 : end
'
);
})
...
...
@@ -668,6 +632,9 @@ describe('SystemParameterTest', function () {
ret
=
true
;
console
.
info
(
'
system_parameter_test_0620 get systemparameter hw_sc.build.os.version sucess:
'
+
data
);
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
done
();
}
else
{
console
.
info
(
'
system_parameter_test_0620 get systemparameter hw_sc.build.os.version failed:
'
...
...
@@ -677,9 +644,6 @@ describe('SystemParameterTest', function () {
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0620 get systemparameter hw_sc.build.os.version abnormal:
'
,
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0620 : end
'
);
})
...
...
@@ -703,15 +667,15 @@ describe('SystemParameterTest', function () {
ret
=
true
;
console
.
info
(
'
system_parameter_test_0640 get systemparameter b.b.b.b.b failed:
'
+
err
.
code
);
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
done
();
}
})
}
catch
(
err
)
{
console
.
info
(
'
system_parameter_test_0640 get systemparameter b.b.b.b.b abnormal:
'
,
err
);
}
setTimeout
(
function
(){
expect
(
ret
).
assertTrue
();
},
'
1000
'
);
console
.
info
(
'
system_parameter_test_0640 : end
'
);
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录