fix: Fix battery additional testcases

Signed-off-by: chenjunwu <chenjunwu4@huawei.com>
This commit is contained in:
chenjunwu 2024-04-26 17:08:20 +08:00
parent d53aa832d9
commit 4bfaacc6b5

View File

@ -340,6 +340,8 @@ HWTEST_F(HdfBatteryHdiTestAdditional, testBatteryUnRegister001, TestSize.Level2)
*/
HWTEST_F(HdfBatteryHdiTestAdditional, testSetChargingLimit001, TestSize.Level1)
{
std::string currentPath = "/data/service/el0/battery/current_limit";
CreateFile(currentPath, "");
ChargingLimit scLimit;
scLimit.type = TYPE_CURRENT;
scLimit.protocol = "sc";
@ -357,6 +359,8 @@ HWTEST_F(HdfBatteryHdiTestAdditional, testSetChargingLimit001, TestSize.Level1)
*/
HWTEST_F(HdfBatteryHdiTestAdditional, testSetChargingLimit002, TestSize.Level1)
{
std::string voltagePath = "/data/service/el0/battery/voltage_limit";
CreateFile(voltagePath, "");
ChargingLimit scLimit;
scLimit.type = TYPE_VOLTAGE;
scLimit.protocol = "sc";