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

Commit 0683ad7f authored by Harpreet "Eli" Sangha's avatar Harpreet "Eli" Sangha Committed by android-build-merger
Browse files

Merge "vibrator: vts: Utilize New toString() Support"

am: aa4af6bf

Change-Id: I5c98b70d8bbc38cf8e3026ec902b66e3a965364e
parents 6887dc32 aa4af6bf
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -135,13 +135,12 @@ TEST_P(VibratorAidl, ValidateEffect) {
            Status status = vibrator->perform(effect, strength, nullptr /*callback*/, &lengthMs);

            if (isEffectSupported) {
                EXPECT_TRUE(status.isOk())
                        << static_cast<int>(effect) << " " << static_cast<int>(strength);
                EXPECT_TRUE(status.isOk()) << toString(effect) << " " << toString(strength);
                EXPECT_GT(lengthMs, 0);
                usleep(lengthMs * 1000);
            } else {
                EXPECT_EQ(status.exceptionCode(), Status::EX_UNSUPPORTED_OPERATION)
                        << static_cast<int>(effect) << " " << static_cast<int>(strength);
                        << toString(effect) << " " << toString(strength);
                EXPECT_EQ(lengthMs, 0);
            }
        }
@@ -202,7 +201,7 @@ TEST_P(VibratorAidl, InvalidEffectsUnsupported) {
            int32_t lengthMs;
            Status status = vibrator->perform(effect, strength, nullptr /*callback*/, &lengthMs);
            EXPECT_EQ(status.exceptionCode(), Status::EX_UNSUPPORTED_OPERATION)
                    << static_cast<int>(effect) << " " << static_cast<int>(strength);
                    << toString(effect) << " " << toString(strength);
        }
    }
    for (Effect effect : kEffects) {
@@ -210,7 +209,7 @@ TEST_P(VibratorAidl, InvalidEffectsUnsupported) {
            int32_t lengthMs;
            Status status = vibrator->perform(effect, strength, nullptr /*callback*/, &lengthMs);
            EXPECT_EQ(status.exceptionCode(), Status::EX_UNSUPPORTED_OPERATION)
                    << static_cast<int>(effect) << " " << static_cast<int>(strength);
                    << toString(effect) << " " << toString(strength);
        }
    }
}