Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
75825a50
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看板
提交
75825a50
编写于
6月 07, 2023
作者:
G
greada
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
power test code optimization
Signed-off-by:
N
greada
<
kangqiao1@huawei.com
>
上级
979060cf
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
130 addition
and
137 deletion
+130
-137
powermgr/battery_manager/src/main/js/test/system_battery.test.js
...r/battery_manager/src/main/js/test/system_battery.test.js
+130
-137
未找到文件。
powermgr/battery_manager/src/main/js/test/system_battery.test.js
浏览文件 @
75825a50
...
@@ -39,7 +39,7 @@ function completeFunc(tag) {
...
@@ -39,7 +39,7 @@ function completeFunc(tag) {
}
}
export
default
function
SystemBatteryTest
()
{
export
default
function
SystemBatteryTest
()
{
describe
(
'
SystemBatteryTest
'
,
function
()
{
describe
(
'
SystemBatteryTest
'
,
function
()
{
console
.
log
(
"
*************System Battery Unit Test Begin*************
"
);
console
.
log
(
"
*************System Battery Unit Test Begin*************
"
);
/**
/**
...
@@ -47,8 +47,7 @@ describe('SystemBatteryTest', function () {
...
@@ -47,8 +47,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_success_test
* @tc.name get_status_success_test
* @tc.desc Battery acquisition kit
* @tc.desc Battery acquisition kit
*/
*/
const
successTest
=
"
get_status_success_test
"
;
it
(
'
get_status_success_test
'
,
0
,
function
()
{
it
(
successTest
,
0
,
function
()
{
battery
.
getStatus
({
battery
.
getStatus
({
success
:
(
data
)
=>
{
success
:
(
data
)
=>
{
successFunc
(
data
,
successTest
);
successFunc
(
data
,
successTest
);
...
@@ -67,8 +66,7 @@ describe('SystemBatteryTest', function () {
...
@@ -67,8 +66,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_success_null_test
* @tc.name get_status_success_null_test
* @tc.desc Battery acquisition kit
* @tc.desc Battery acquisition kit
*/
*/
const
successNullTest
=
"
get_status_success_null_test
"
;
it
(
'
get_status_success_null_test
'
,
0
,
function
()
{
it
(
successNullTest
,
0
,
function
()
{
battery
.
getStatus
({
battery
.
getStatus
({
success
:
null
,
success
:
null
,
fail
:
(
data
,
code
)
=>
{
fail
:
(
data
,
code
)
=>
{
...
@@ -85,8 +83,7 @@ describe('SystemBatteryTest', function () {
...
@@ -85,8 +83,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_success_empty_test
* @tc.name get_status_success_empty_test
* @tc.desc Battery acquisition kit
* @tc.desc Battery acquisition kit
*/
*/
const
successEmptyTest
=
"
get_status_success_null_test
"
;
it
(
'
get_status_success_null_test
'
,
0
,
function
()
{
it
(
successEmptyTest
,
0
,
function
()
{
battery
.
getStatus
({
battery
.
getStatus
({
fail
:
(
data
,
code
)
=>
{
fail
:
(
data
,
code
)
=>
{
failFunc
(
data
,
code
,
successEmptyTest
);
failFunc
(
data
,
code
,
successEmptyTest
);
...
@@ -102,8 +99,7 @@ describe('SystemBatteryTest', function () {
...
@@ -102,8 +99,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_fail_null_test
* @tc.name get_status_fail_null_test
* @tc.desc Battery acquisition kit
* @tc.desc Battery acquisition kit
*/
*/
let
failNullTest
=
"
get_status_fail_null_test
"
;
it
(
'
get_status_fail_null_test
'
,
0
,
function
()
{
it
(
failNullTest
,
0
,
function
()
{
battery
.
getStatus
({
battery
.
getStatus
({
success
:
(
data
)
=>
{
success
:
(
data
)
=>
{
successFunc
(
data
,
failNullTest
);
successFunc
(
data
,
failNullTest
);
...
@@ -120,8 +116,7 @@ describe('SystemBatteryTest', function () {
...
@@ -120,8 +116,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_fail_empty_test
* @tc.name get_status_fail_empty_test
* @tc.desc Battery acquisition kit
* @tc.desc Battery acquisition kit
*/
*/
let
failEmptyTest
=
"
get_status_fail_empty_test
"
;
it
(
'
get_status_fail_empty_test
'
,
0
,
function
()
{
it
(
failEmptyTest
,
0
,
function
()
{
battery
.
getStatus
({
battery
.
getStatus
({
success
:
()
=>
{
success
:
()
=>
{
successFunc
(
data
,
failEmptyTest
);
successFunc
(
data
,
failEmptyTest
);
...
@@ -137,8 +132,7 @@ describe('SystemBatteryTest', function () {
...
@@ -137,8 +132,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_complete_null_test
* @tc.name get_status_complete_null_test
* @tc.desc Battery acquisition kit
* @tc.desc Battery acquisition kit
*/
*/
let
completeNullTest
=
"
get_status_complete_null_test
"
;
it
(
'
get_status_complete_null_test
'
,
0
,
function
()
{
it
(
completeNullTest
,
0
,
function
()
{
battery
.
getStatus
({
battery
.
getStatus
({
success
:
(
data
)
=>
{
success
:
(
data
)
=>
{
successFunc
(
data
,
completeNullTest
);
successFunc
(
data
,
completeNullTest
);
...
@@ -155,8 +149,7 @@ describe('SystemBatteryTest', function () {
...
@@ -155,8 +149,7 @@ describe('SystemBatteryTest', function () {
* @tc.name get_status_complete_empty_test
* @tc.name get_status_complete_empty_test
* @tc.desc Battery acquisition kit
* @tc.desc Battery acquisition kit
*/
*/
let
completeEmptyTest
=
"
get_status_complete_empty_test
"
;
it
(
'
get_status_complete_empty_test
'
,
0
,
function
()
{
it
(
completeEmptyTest
,
0
,
function
()
{
battery
.
getStatus
({
battery
.
getStatus
({
success
:
(
data
)
=>
{
success
:
(
data
)
=>
{
successFunc
(
data
,
completeEmptyTest
);
successFunc
(
data
,
completeEmptyTest
);
...
@@ -192,5 +185,5 @@ describe('SystemBatteryTest', function () {
...
@@ -192,5 +185,5 @@ describe('SystemBatteryTest', function () {
battery
.
getStatus
();
battery
.
getStatus
();
expect
(
!
allNull
).
assertTrue
();
expect
(
!
allNull
).
assertTrue
();
});
});
})
})
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录