diff --git a/tv/tuner/aidl/vts/functional/FrontendTests.cpp b/tv/tuner/aidl/vts/functional/FrontendTests.cpp index a1f51dfe1a..2ff0c3d350 100644 --- a/tv/tuner/aidl/vts/functional/FrontendTests.cpp +++ b/tv/tuner/aidl/vts/functional/FrontendTests.cpp @@ -14,10 +14,10 @@ * limitations under the License. */ -#include - #include "FrontendTests.h" +#include + ndk::ScopedAStatus FrontendCallback::onEvent(FrontendEventType frontendEventType) { android::Mutex::Autolock autoLock(mMsgLock); ALOGD("[vts] frontend event received. Type: %d", frontendEventType); @@ -323,7 +323,10 @@ void FrontendTests::verifyFrontendStatus(vector statusTypes, FrontendStatusType type = statusTypes[i]; switch (type) { case FrontendStatusType::MODULATIONS: { - // TODO: verify modulations + ASSERT_TRUE(std::equal( + realStatuses[i].get().begin(), + realStatuses[i].get().end(), + expectStatuses[i].get().begin())); break; } case FrontendStatusType::BERS: { @@ -340,11 +343,13 @@ void FrontendTests::verifyFrontendStatus(vector statusTypes, break; } case FrontendStatusType::GUARD_INTERVAL: { - // TODO: verify interval + ASSERT_TRUE(realStatuses[i].get() == + expectStatuses[i].get()); break; } case FrontendStatusType::TRANSMISSION_MODE: { - // TODO: verify tranmission mode + ASSERT_TRUE(realStatuses[i].get() == + expectStatuses[i].get()); break; } case FrontendStatusType::UEC: { @@ -379,7 +384,8 @@ void FrontendTests::verifyFrontendStatus(vector statusTypes, break; } case FrontendStatusType::ROLL_OFF: { - // TODO: verify roll off + ASSERT_TRUE(realStatuses[i].get() == + expectStatuses[i].get()); break; } case FrontendStatusType::IS_MISO: { @@ -599,9 +605,10 @@ void FrontendTests::statusReadinessTest(FrontendConfig frontendConf) { ASSERT_TRUE(tuneFrontend(frontendConf, false /*testWithDemux*/)); // TODO: find a better way to push all frontend status types - for (int32_t i = 0; i < static_cast(FrontendStatusType::ATSC3_ALL_PLP_INFO); i++) { + for (int32_t i = 0; i <= static_cast(FrontendStatusType::ATSC3_ALL_PLP_INFO); i++) { allTypes.push_back(static_cast(i)); } + ndk::ScopedAStatus status = mFrontend->getFrontendStatusReadiness(allTypes, &readiness); ASSERT_TRUE(status.isOk()); ASSERT_TRUE(readiness.size() == allTypes.size());