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

Commit 1bf90fa4 authored by Yu Shan's avatar Yu Shan
Browse files

Fix a bug in VUR VTS test.

The logic is to check whether each element is not the same as
previous element. We forgot to increase i.

Test: Presubmit
Bug: 326987403
Change-Id: I5cab61a86092fb14d17551a533e8cdaff1abfee5
parent 13a87453
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -640,13 +640,12 @@ TEST_P(VtsHalAutomotiveVehicleTargetTest, subscribe_enableVurIfSupported) {
    size_t i = 0;
    float previousValue;
    for (const auto& [_, value] : valuesByTimestamp) {
        if (i == 0) {
            previousValue = value;
        } else {
        if (i != 0) {
            ASSERT_FALSE(value != previousValue) << "received duplicate value: " << value
                                                 << " when variable update rate is true";
            previousValue = value;
        }
        previousValue = value;
        i++;
    }
}