Merge "Ignore NanSessionStateChange test for old HAL" into udc-dev

This commit is contained in:
Rocky Fang
2023-06-16 16:44:48 +00:00
committed by Android (Google) Code Review

View File

@@ -385,9 +385,15 @@ TEST_P(ContextHubAidl, TestInvalidHostConnection) {
TEST_P(ContextHubAidl, TestNanSessionStateChange) {
NanSessionStateUpdate update;
update.state = true;
ASSERT_TRUE(contextHub->onNanSessionStateChanged(update).isOk());
update.state = false;
ASSERT_TRUE(contextHub->onNanSessionStateChanged(update).isOk());
Status status = contextHub->onNanSessionStateChanged(update);
if (status.exceptionCode() == Status::EX_UNSUPPORTED_OPERATION ||
status.transactionError() == android::UNKNOWN_TRANSACTION) {
GTEST_SKIP() << "Not supported -> old API; or not implemented";
} else {
ASSERT_TRUE(status.isOk());
update.state = false;
ASSERT_TRUE(contextHub->onNanSessionStateChanged(update).isOk());
}
}
std::string PrintGeneratedTest(const testing::TestParamInfo<ContextHubAidl::ParamType>& info) {