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

am: aa4af6bf03

Change-Id: I5c98b70d8bbc38cf8e3026ec902b66e3a965364e
This commit is contained in:
Harpreet "Eli" Sangha
2019-12-10 22:44:28 -08:00
committed by android-build-merger

View File

@@ -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);
}
}
}