Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30b54c45 authored by Stephane Lee's avatar Stephane Lee Committed by Yifan Hong
Browse files

Allow batteryChargeTimeToFullNowSeconds to be -1

Test: Run the test under an implementation that doesn't support
  batteryChargeTimeToFullNowSeconds
Bug: 166841711
Change-Id: I18fb11bb0a2233a9a89183a5f9ecf597e7719172
Merged-In: I18fb11bb0a2233a9a89183a5f9ecf597e7719172
(cherry picked from commit c2dc510a)
parent 0cd6bffb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ TEST_P(HealthHidlTest, getHealthInfo_2_1) {
        ASSERT_EQ(Result::SUCCESS, result);

        EXPECT_TRUE(IsEnum(value.batteryCapacityLevel)) << " BatteryCapacityLevel";
        EXPECT_GE(value.batteryChargeTimeToFullNowSeconds, 0);
        EXPECT_GE(value.batteryChargeTimeToFullNowSeconds, -1);

        EXPECT_GE(value.batteryFullChargeDesignCapacityUah, 0)
                << "batteryFullChargeDesignCapacityUah should not be negative";