CEC: Add VTS test to clear and add logical address am: 0ebb24b4b7 am: 8fec722557

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1556542

Change-Id: I1984855b901862e6f1e911b9a2c45b8bd6c2e7ef
This commit is contained in:
Shraddha Basantwani 2021-03-30 11:57:54 +00:00 committed by Automerger Merge Worker
commit 1f444aead3

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