Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
dff5652c
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看板
提交
dff5652c
编写于
2月 22, 2022
作者:
L
Lu Jiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update battery statistics interface
Signed-off-by:
N
Lu Jiang
<
lu_jiang@neusoft.com
>
上级
c0e1bbed
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
127 addition
and
127 deletion
+127
-127
powermgr/powermgrbatterystats/src/main/js/default/test/batterystats_uint.test.js
...ystats/src/main/js/default/test/batterystats_uint.test.js
+127
-127
未找到文件。
powermgr/powermgrbatterystats/src/main/js/default/test/batterystats_uint.test.js
浏览文件 @
dff5652c
...
...
@@ -14,7 +14,7 @@
*/
import
app
from
'
@system.app
'
import
battery
stats
from
"
@ohos.batterystat
s
"
import
battery
Stats
from
"
@ohos.batterystatistic
s
"
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
ConsumptionType
=
{
...
...
@@ -30,16 +30,16 @@ var ConsumptionType = {
}
describe
(
'
appInfoTest
'
,
function
()
{
console
.
log
(
"
*************
Batterys
tats API Test Begin*************
"
);
console
.
log
(
"
*************
batteryS
tats API Test Begin*************
"
);
/**
/* @tc.number battery
s
tats_js_001
* @tc.name
Batterys
tats_001
* @tc.desc
BatteryStats getB
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_BLUETOOTH
/* @tc.number battery
S
tats_js_001
* @tc.name
batteryS
tats_001
* @tc.desc
batteryStats getb
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_BLUETOOTH
*/
it
(
'
Batterys
tats_001
'
,
0
,
async
function
(
done
)
{
it
(
'
batteryS
tats_001
'
,
0
,
async
function
(
done
)
{
var
infoList
;
let
promise
=
battery
stats
.
getB
atteryStats
().
then
(
function
(
value
)
{
let
promise
=
battery
Stats
.
getb
atteryStats
().
then
(
function
(
value
)
{
infoList
=
value
;
console
.
info
(
"
Executing
"
);
},
function
(
msg
)
{
...
...
@@ -60,13 +60,13 @@ describe('appInfoTest', function () {
})
/**
/* @tc.number battery
s
tats_js_002
* @tc.name
Batterys
tats_002
* @tc.desc
BatteryStats getB
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
/* @tc.number battery
S
tats_js_002
* @tc.name
batteryS
tats_002
* @tc.desc
batteryStats getb
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
*/
it
(
'
Batterys
tats_002
'
,
0
,
async
function
(
done
)
{
it
(
'
batteryS
tats_002
'
,
0
,
async
function
(
done
)
{
var
infoList
;
let
promise
=
battery
stats
.
getB
atteryStats
().
then
(
function
(
value
)
{
let
promise
=
battery
Stats
.
getb
atteryStats
().
then
(
function
(
value
)
{
infoList
=
value
;
console
.
info
(
"
Executing
"
);
},
function
(
msg
)
{
...
...
@@ -87,13 +87,13 @@ describe('appInfoTest', function () {
})
/**
/* @tc.number battery
s
tats_js_003
* @tc.name
Batterys
tats_003
* @tc.desc
BatteryStats getB
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_PHONE
/* @tc.number battery
S
tats_js_003
* @tc.name
batteryS
tats_003
* @tc.desc
batteryStats getb
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_PHONE
*/
it
(
'
Batterys
tats_003
'
,
0
,
async
function
(
done
)
{
it
(
'
batteryS
tats_003
'
,
0
,
async
function
(
done
)
{
var
infoList
;
let
promise
=
battery
stats
.
getB
atteryStats
().
then
(
function
(
value
)
{
let
promise
=
battery
Stats
.
getb
atteryStats
().
then
(
function
(
value
)
{
infoList
=
value
;
console
.
info
(
"
Executing
"
);
},
function
(
msg
)
{
...
...
@@ -114,13 +114,13 @@ describe('appInfoTest', function () {
})
/**
/* @tc.number battery
s
tats_js_004
* @tc.name
Batterys
tats_004
* @tc.desc
BatteryStats getB
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_RADIO
/* @tc.number battery
S
tats_js_004
* @tc.name
batteryS
tats_004
* @tc.desc
batteryStats getb
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_RADIO
*/
it
(
'
Batterys
tats_004
'
,
0
,
async
function
(
done
)
{
it
(
'
batteryS
tats_004
'
,
0
,
async
function
(
done
)
{
var
infoList
;
let
promise
=
battery
stats
.
getB
atteryStats
().
then
(
function
(
value
)
{
let
promise
=
battery
Stats
.
getb
atteryStats
().
then
(
function
(
value
)
{
infoList
=
value
;
console
.
info
(
"
Executing
"
);
},
function
(
msg
)
{
...
...
@@ -141,13 +141,13 @@ describe('appInfoTest', function () {
})
/**
/* @tc.number battery
s
tats_js_005
* @tc.name
Batterys
tats_005
* @tc.desc
BatteryStats getB
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_SCREEN
/* @tc.number battery
S
tats_js_005
* @tc.name
batteryS
tats_005
* @tc.desc
batteryStats getb
atteryStats Interface Test type = ConsumptionType.CONSUMPTION_TYPE_SCREEN
*/
it
(
'
Batterys
tats_005
'
,
0
,
async
function
(
done
)
{
it
(
'
batteryS
tats_005
'
,
0
,
async
function
(
done
)
{
var
infoList
;
let
promise
=
battery
stats
.
getB
atteryStats
().
then
(
function
(
value
)
{
let
promise
=
battery
Stats
.
getb
atteryStats
().
then
(
function
(
value
)
{
infoList
=
value
;
console
.
info
(
"
Executing
"
);
},
function
(
msg
)
{
...
...
@@ -167,43 +167,43 @@ describe('appInfoTest', function () {
expect
(
found
).
assertTrue
();
})
/* @tc.number battery
s
tats_js_006
* @tc.name
Batterys
tats_006
* @tc.desc
B
atteryStats getAppPowerValue Interface Test uid = 111
/* @tc.number battery
S
tats_js_006
* @tc.name
batteryS
tats_006
* @tc.desc
b
atteryStats getAppPowerValue Interface Test uid = 111
*/
it
(
'
Batterys
tats_006
'
,
0
,
function
()
{
var
power
=
battery
s
tats
.
getAppPowerValue
(
111
);
it
(
'
batteryS
tats_006
'
,
0
,
function
()
{
var
power
=
battery
S
tats
.
getAppPowerValue
(
111
);
console
.
info
(
"
App consumption power of uid 111 is:
"
+
power
);
expect
(
power
>=
0
).
assertTrue
();
})
/* @tc.number battery
s
tats_js_007
* @tc.name
Batterys
tats_007
* @tc.desc
B
atteryStats getAppPowerValue Interface Test uid = -111
/* @tc.number battery
S
tats_js_007
* @tc.name
batteryS
tats_007
* @tc.desc
b
atteryStats getAppPowerValue Interface Test uid = -111
*/
it
(
'
Batterys
tats_007
'
,
0
,
function
()
{
var
power
=
battery
s
tats
.
getAppPowerValue
(
-
111
);
it
(
'
batteryS
tats_007
'
,
0
,
function
()
{
var
power
=
battery
S
tats
.
getAppPowerValue
(
-
111
);
console
.
info
(
"
App consumption power of uid -111 is:
"
+
power
);
expect
(
power
).
assertEqual
(
0
);
})
/* @tc.number battery
s
tats_js_008
* @tc.name
Batterys
tats_008
* @tc.desc
B
atteryStats getAppPowerValue Interface Test uid = 0
/* @tc.number battery
S
tats_js_008
* @tc.name
batteryS
tats_008
* @tc.desc
b
atteryStats getAppPowerValue Interface Test uid = 0
*/
it
(
'
Batterys
tats_008
'
,
0
,
function
()
{
var
power
=
battery
s
tats
.
getAppPowerValue
(
0
);
it
(
'
batteryS
tats_008
'
,
0
,
function
()
{
var
power
=
battery
S
tats
.
getAppPowerValue
(
0
);
console
.
info
(
"
App consumption power of uid 0 is:
"
+
power
);
expect
(
power
>=
0
).
assertTrue
();
})
/* @tc.number battery
s
tats_js_009
* @tc.name
Batterys
tats_009
* @tc.desc
B
atteryStats getAppPowerValue Interface Test uid = "111"
/* @tc.number battery
S
tats_js_009
* @tc.name
batteryS
tats_009
* @tc.desc
b
atteryStats getAppPowerValue Interface Test uid = "111"
*/
it
(
'
Batterys
tats_009
'
,
0
,
function
()
{
it
(
'
batteryS
tats_009
'
,
0
,
function
()
{
try
{
battery
s
tats
.
getAppPowerValue
(
"
111
"
);
battery
S
tats
.
getAppPowerValue
(
"
111
"
);
}
catch
(
e
)
{
var
errorMsg
=
"
Argument type check works:
"
+
e
;
console
.
debug
(
"
errorMsg
"
);
...
...
@@ -211,13 +211,13 @@ describe('appInfoTest', function () {
}
})
/* @tc.number battery
s
tats_js_010
* @tc.name
Batterys
tats_010
* @tc.desc
B
atteryStats getAppPowerValue Interface Test uid = 111, 222
/* @tc.number battery
S
tats_js_010
* @tc.name
batteryS
tats_010
* @tc.desc
b
atteryStats getAppPowerValue Interface Test uid = 111, 222
*/
it
(
'
Batterys
tats_010
'
,
0
,
function
()
{
it
(
'
batteryS
tats_010
'
,
0
,
function
()
{
try
{
battery
s
tats
.
getAppPowerValue
(
111
,
222
);
battery
S
tats
.
getAppPowerValue
(
111
,
222
);
}
catch
(
e
)
{
var
errorMsg
=
"
Argument number check works:
"
+
e
;
console
.
debug
(
errorMsg
);
...
...
@@ -225,43 +225,43 @@ describe('appInfoTest', function () {
}
})
/* @tc.number battery
s
tats_js_011
* @tc.name
Batterys
tats_011
* @tc.desc
B
atteryStats getAppPowerPercent Interface Test uid = 111
/* @tc.number battery
S
tats_js_011
* @tc.name
batteryS
tats_011
* @tc.desc
b
atteryStats getAppPowerPercent Interface Test uid = 111
*/
it
(
'
Batterys
tats_011
'
,
0
,
function
()
{
var
powerPercent
=
battery
s
tats
.
getAppPowerPercent
(
111
);
it
(
'
batteryS
tats_011
'
,
0
,
function
()
{
var
powerPercent
=
battery
S
tats
.
getAppPowerPercent
(
111
);
console
.
info
(
"
App consumption percent of uid 111 is:
"
+
powerPercent
);
expect
(
powerPercent
>=
0
).
assertTrue
();
})
/* @tc.number battery
s
tats_js_012
* @tc.name
Batterys
tats_012
* @tc.desc
B
atteryStats getAppPowerPercent Interface Test uid = -111
/* @tc.number battery
S
tats_js_012
* @tc.name
batteryS
tats_012
* @tc.desc
b
atteryStats getAppPowerPercent Interface Test uid = -111
*/
it
(
'
Batterys
tats_012
'
,
0
,
function
()
{
var
powerPercent
=
battery
s
tats
.
getAppPowerPercent
(
-
111
);
it
(
'
batteryS
tats_012
'
,
0
,
function
()
{
var
powerPercent
=
battery
S
tats
.
getAppPowerPercent
(
-
111
);
console
.
info
(
"
App consumption percent of uid -111 is:
"
+
powerPercent
);
expect
(
powerPercent
).
assertEqual
(
0
);
})
/* @tc.number battery
s
tats_js_013
* @tc.name
Batterys
tats_013
* @tc.desc
B
atteryStats getAppPowerPercent Interface Test uid = 0
/* @tc.number battery
S
tats_js_013
* @tc.name
batteryS
tats_013
* @tc.desc
b
atteryStats getAppPowerPercent Interface Test uid = 0
*/
it
(
'
Batterys
tats_013
'
,
0
,
function
()
{
var
powerPercent
=
battery
s
tats
.
getAppPowerPercent
(
0
);
it
(
'
batteryS
tats_013
'
,
0
,
function
()
{
var
powerPercent
=
battery
S
tats
.
getAppPowerPercent
(
0
);
console
.
info
(
"
App consumption percent of uid 0 is:
"
+
powerPercent
);
expect
(
powerPercent
>=
0
).
assertTrue
();
})
/* @tc.number battery
s
tats_js_014
* @tc.name
Batterys
tats_014
* @tc.desc
B
atteryStats getAppPowerPercent Interface Test uid = "111"
/* @tc.number battery
S
tats_js_014
* @tc.name
batteryS
tats_014
* @tc.desc
b
atteryStats getAppPowerPercent Interface Test uid = "111"
*/
it
(
'
Batterys
tats_014
'
,
0
,
function
()
{
it
(
'
batteryS
tats_014
'
,
0
,
function
()
{
try
{
battery
s
tats
.
getAppPowerPercent
(
"
111
"
);
battery
S
tats
.
getAppPowerPercent
(
"
111
"
);
}
catch
(
e
)
{
var
errorMsg
=
"
Argument type check works:
"
+
e
;
console
.
debug
(
"
errorMsg
"
);
...
...
@@ -269,13 +269,13 @@ describe('appInfoTest', function () {
}
})
/* @tc.number battery
s
tats_js_015
* @tc.name
Batterys
tats_015
* @tc.desc
B
atteryStats getAppPowerPercent Interface Test uid = 111, 222
/* @tc.number battery
S
tats_js_015
* @tc.name
batteryS
tats_015
* @tc.desc
b
atteryStats getAppPowerPercent Interface Test uid = 111, 222
*/
it
(
'
Batterys
tats_015
'
,
0
,
function
()
{
it
(
'
batteryS
tats_015
'
,
0
,
function
()
{
try
{
battery
s
tats
.
getAppPowerPercent
(
111
,
222
);
battery
S
tats
.
getAppPowerPercent
(
111
,
222
);
}
catch
(
e
)
{
var
errorMsg
=
"
Argument number check works:
"
+
e
;
console
.
debug
(
errorMsg
);
...
...
@@ -283,43 +283,43 @@ describe('appInfoTest', function () {
}
})
/* @tc.number battery
s
tats_js_016
* @tc.name
Batterys
tats_016
* @tc.desc
B
atteryStats getHardwareUnitPowerValue Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
/* @tc.number battery
S
tats_js_016
* @tc.name
batteryS
tats_016
* @tc.desc
b
atteryStats getHardwareUnitPowerValue Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
*/
it
(
'
Batterys
tats_016
'
,
0
,
function
()
{
var
power
=
battery
s
tats
.
getHardwareUnitPowerValue
(
ConsumptionType
.
CONSUMPTION_TYPE_IDLE
);
it
(
'
batteryS
tats_016
'
,
0
,
function
()
{
var
power
=
battery
S
tats
.
getHardwareUnitPowerValue
(
ConsumptionType
.
CONSUMPTION_TYPE_IDLE
);
console
.
info
(
"
Idle consumption power is:
"
+
power
);
expect
(
power
>=
0
).
assertTrue
();
})
/* @tc.number battery
s
tats_js_017
* @tc.name
Batterys
tats_017
* @tc.desc
B
atteryStats getHardwareUnitPowerValue Interface Test type = 111
/* @tc.number battery
S
tats_js_017
* @tc.name
batteryS
tats_017
* @tc.desc
b
atteryStats getHardwareUnitPowerValue Interface Test type = 111
*/
it
(
'
Batterys
tats_017
'
,
0
,
function
()
{
var
power
=
battery
s
tats
.
getHardwareUnitPowerValue
(
111
);
it
(
'
batteryS
tats_017
'
,
0
,
function
()
{
var
power
=
battery
S
tats
.
getHardwareUnitPowerValue
(
111
);
console
.
info
(
"
111's consumption power is:
"
+
power
);
expect
(
power
).
assertEqual
(
0
);
})
/* @tc.number battery
s
tats_js_018
* @tc.name
Batterys
tats_018
* @tc.desc
B
atteryStats getHardwareUnitPowerValue Interface Test type = 0
/* @tc.number battery
S
tats_js_018
* @tc.name
batteryS
tats_018
* @tc.desc
b
atteryStats getHardwareUnitPowerValue Interface Test type = 0
*/
it
(
'
Batterys
tats_018
'
,
0
,
function
()
{
var
power
=
battery
s
tats
.
getHardwareUnitPowerValue
(
0
);
it
(
'
batteryS
tats_018
'
,
0
,
function
()
{
var
power
=
battery
S
tats
.
getHardwareUnitPowerValue
(
0
);
console
.
info
(
"
0's consumption power is:
"
+
power
);
expect
(
power
).
assertEqual
(
0
);
})
/* @tc.number battery
s
tats_js_019
* @tc.name
Batterys
tats_019
* @tc.desc
B
atteryStats getHardwareUnitPowerValue Interface Test type = "test"
/* @tc.number battery
S
tats_js_019
* @tc.name
batteryS
tats_019
* @tc.desc
b
atteryStats getHardwareUnitPowerValue Interface Test type = "test"
*/
it
(
'
Batterys
tats_019
'
,
0
,
function
()
{
it
(
'
batteryS
tats_019
'
,
0
,
function
()
{
try
{
battery
s
tats
.
getHardwareUnitPowerValue
(
"
test
"
);
battery
S
tats
.
getHardwareUnitPowerValue
(
"
test
"
);
}
catch
(
e
)
{
var
errorMsg
=
"
Argument type check works:
"
+
e
;
console
.
debug
(
"
errorMsg
"
);
...
...
@@ -327,14 +327,14 @@ describe('appInfoTest', function () {
}
})
/* @tc.number battery
s
tats_js_020
* @tc.name
Batterys
tats_020
* @tc.desc
B
atteryStats getHardwareUnitPowerValue Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
/* @tc.number battery
S
tats_js_020
* @tc.name
batteryS
tats_020
* @tc.desc
b
atteryStats getHardwareUnitPowerValue Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
* and ConsumptionType.CONSUMPTION_TYPE_WIFI
*/
it
(
'
Batterys
tats_020
'
,
0
,
function
()
{
it
(
'
batteryS
tats_020
'
,
0
,
function
()
{
try
{
battery
s
tats
.
getHardwareUnitPowerValue
(
ConsumptionType
.
CONSUMPTION_TYPE_IDLE
,
battery
S
tats
.
getHardwareUnitPowerValue
(
ConsumptionType
.
CONSUMPTION_TYPE_IDLE
,
ConsumptionType
.
CONSUMPTION_TYPE_WIFI
);
}
catch
(
e
)
{
var
errorMsg
=
"
Argument number check works:
"
+
e
;
...
...
@@ -343,43 +343,43 @@ describe('appInfoTest', function () {
}
})
/* @tc.number battery
s
tats_js_021
* @tc.name
Batterys
tats_021
* @tc.desc
B
atteryStats getHardwareUnitPowerPercent Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
/* @tc.number battery
S
tats_js_021
* @tc.name
batteryS
tats_021
* @tc.desc
b
atteryStats getHardwareUnitPowerPercent Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
*/
it
(
'
Batterys
tats_021
'
,
0
,
function
()
{
var
powerPercent
=
battery
s
tats
.
getHardwareUnitPowerPercent
(
ConsumptionType
.
CONSUMPTION_TYPE_IDLE
);
it
(
'
batteryS
tats_021
'
,
0
,
function
()
{
var
powerPercent
=
battery
S
tats
.
getHardwareUnitPowerPercent
(
ConsumptionType
.
CONSUMPTION_TYPE_IDLE
);
console
.
info
(
"
Idle consumption percent is:
"
+
powerPercent
);
expect
(
powerPercent
>=
0
).
assertTrue
();
})
/* @tc.number battery
s
tats_js_022
* @tc.name
Batterys
tats_022
* @tc.desc
B
atteryStats getHardwareUnitPowerPercent Interface Test type = 111
/* @tc.number battery
S
tats_js_022
* @tc.name
batteryS
tats_022
* @tc.desc
b
atteryStats getHardwareUnitPowerPercent Interface Test type = 111
*/
it
(
'
Batterys
tats_022
'
,
0
,
function
()
{
var
powerPercent
=
battery
s
tats
.
getHardwareUnitPowerPercent
(
111
);
it
(
'
batteryS
tats_022
'
,
0
,
function
()
{
var
powerPercent
=
battery
S
tats
.
getHardwareUnitPowerPercent
(
111
);
console
.
info
(
"
111's consumption percent is:
"
+
powerPercent
);
expect
(
powerPercent
).
assertEqual
(
0
);
})
/* @tc.number battery
s
tats_js_023
* @tc.name
Batterys
tats_023
* @tc.desc
B
atteryStats getHardwareUnitPowerPercent Interface Test type = 0
/* @tc.number battery
S
tats_js_023
* @tc.name
batteryS
tats_023
* @tc.desc
b
atteryStats getHardwareUnitPowerPercent Interface Test type = 0
*/
it
(
'
Batterys
tats_023
'
,
0
,
function
()
{
var
powerPercent
=
battery
s
tats
.
getHardwareUnitPowerPercent
(
0
);
it
(
'
batteryS
tats_023
'
,
0
,
function
()
{
var
powerPercent
=
battery
S
tats
.
getHardwareUnitPowerPercent
(
0
);
console
.
info
(
"
0's consumption percent is:
"
+
powerPercent
);
expect
(
powerPercent
).
assertEqual
(
0
);
})
/* @tc.number battery
s
tats_js_024
* @tc.name
Batterys
tats_024
* @tc.desc
B
atteryStats getHardwareUnitPowerPercent Interface Test type = "test"
/* @tc.number battery
S
tats_js_024
* @tc.name
batteryS
tats_024
* @tc.desc
b
atteryStats getHardwareUnitPowerPercent Interface Test type = "test"
*/
it
(
'
Batterys
tats_024
'
,
0
,
function
()
{
it
(
'
batteryS
tats_024
'
,
0
,
function
()
{
try
{
battery
s
tats
.
getHardwareUnitPowerPercent
(
"
test
"
);
battery
S
tats
.
getHardwareUnitPowerPercent
(
"
test
"
);
}
catch
(
e
)
{
var
errorMsg
=
"
Argument type check works:
"
+
e
;
console
.
debug
(
"
errorMsg
"
);
...
...
@@ -387,14 +387,14 @@ describe('appInfoTest', function () {
}
})
/* @tc.number battery
s
tats_js_025
* @tc.name
Batterys
tats_025
* @tc.desc
B
atteryStats getHardwareUnitPowerPercent Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
/* @tc.number battery
S
tats_js_025
* @tc.name
batteryS
tats_025
* @tc.desc
b
atteryStats getHardwareUnitPowerPercent Interface Test type = ConsumptionType.CONSUMPTION_TYPE_IDLE
* and ConsumptionType.CONSUMPTION_TYPE_WIFI
*/
it
(
'
Batterys
tats_025
'
,
0
,
function
()
{
it
(
'
batteryS
tats_025
'
,
0
,
function
()
{
try
{
battery
s
tats
.
getHardwareUnitPowerPercent
(
ConsumptionType
.
CONSUMPTION_TYPE_IDLE
,
battery
S
tats
.
getHardwareUnitPowerPercent
(
ConsumptionType
.
CONSUMPTION_TYPE_IDLE
,
ConsumptionType
.
CONSUMPTION_TYPE_WIFI
);
}
catch
(
e
)
{
var
errorMsg
=
"
Argument number check works:
"
+
e
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录