CEC: Add VTS test to clear and add logical address

Test: atest VtsHalTvCecV1_0TargetTest
Bug: 172316717
Change-Id: I9b66082ed360a158e18deb845e8888a39a2a299f
This commit is contained in:
Shraddha Basantwani 2021-01-21 14:18:36 +05:30
parent b494d6140f
commit 0ebb24b4b7

View file

@ -28,6 +28,7 @@
using ::android::sp;
using ::android::hardware::hidl_death_recipient;
using ::android::hardware::Return;
using ::android::hardware::tv::cec::V1_0::CecLogicalAddress;
using ::android::hardware::tv::cec::V1_0::IHdmiCec;
using ::android::hardware::tv::cec::V1_0::Result;
@ -66,6 +67,12 @@ INSTANTIATE_TEST_SUITE_P(
testing::ValuesIn(android::hardware::getAllHalInstanceNames(IHdmiCec::descriptor)),
android::hardware::PrintInstanceNameToString);
TEST_P(HdmiCecTest, ClearAddLogicalAddress) {
hdmiCec->clearLogicalAddress();
Return<Result> ret = hdmiCec->addLogicalAddress(CecLogicalAddress::PLAYBACK_3);
EXPECT_EQ(ret, Result::SUCCESS);
}
TEST_P(HdmiCecTest, CecVersion) {
Return<int32_t> ret = hdmiCec->getCecVersion();
EXPECT_GE(ret, CEC_VERSION);