mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 22:04:26 +00:00
Merge "vibrator: vts: Utilize New toString() Support" am: aa4af6bf03 am: 0683ad7f7f
Change-Id: I7e7fe219138ac9d57beaab5e0712611ce374464f
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user