Improve OpenAfterOpen VTS test am: 056aa140ca
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3040299 Change-Id: I1ba8e032c62f3e5b21844f776ea0fc918d2f2529 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
bdf398486d
1 changed files with 11 additions and 0 deletions
|
@ -562,7 +562,18 @@ TEST_P(NfcHidlTest, CloseAfterClose) {
|
|||
*/
|
||||
TEST_P(NfcHidlTest, OpenAfterOpen) {
|
||||
EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
|
||||
// Wait for OPEN_CPLT event
|
||||
auto res = nfc_cb_->WaitForCallback(kCallbackNameSendEvent);
|
||||
EXPECT_TRUE(res.no_timeout);
|
||||
EXPECT_EQ(NfcEvent::OPEN_CPLT, res.args->last_event_);
|
||||
EXPECT_EQ(NfcStatus::OK, res.args->last_status_);
|
||||
|
||||
EXPECT_EQ(NfcStatus::OK, nfc_->open(nfc_cb_));
|
||||
// Wait for OPEN_CPLT event
|
||||
res = nfc_cb_->WaitForCallback(kCallbackNameSendEvent);
|
||||
EXPECT_TRUE(res.no_timeout);
|
||||
EXPECT_EQ(NfcEvent::OPEN_CPLT, res.args->last_event_);
|
||||
EXPECT_EQ(NfcStatus::OK, res.args->last_status_);
|
||||
}
|
||||
|
||||
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(NfcHidlTest);
|
||||
|
|
Loading…
Reference in a new issue