Add EMPTY_RECORD for getDeviceIdentity

Remove same unit test case with arguments "","0" for:
- sendEnvelope
- sendTerminalResponseToSim
- sendEnvelopeWithStatus

Test: verified by vendor, treehuger
Bug: 62926561
Change-Id: I5f535bdfc5821275a7ea2571d411374e0d7a8822
Merged-In: I5f535bdfc5821275a7ea2571d411374e0d7a8822
(cherry picked from commit 67901bf2ce)
This commit is contained in:
sqian 2017-07-28 11:28:27 -07:00 committed by Keun Soo Yim
parent 69ad0a9c6f
commit 40d93997b5
2 changed files with 2 additions and 51 deletions

View file

@ -397,7 +397,8 @@ TEST_F(RadioHidlTest, getDeviceIdentity) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::EMPTY_RECORD);
}
}

View file

@ -39,23 +39,6 @@ TEST_F(RadioHidlTest, sendEnvelope) {
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE);
}
// Test with sending random string
serial = GetRandomSerialNumber();
content = "0";
radio->sendEnvelope(serial, content);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
ASSERT_TRUE(CheckGeneralError() ||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE);
}
}
/*
@ -79,23 +62,6 @@ TEST_F(RadioHidlTest, sendTerminalResponseToSim) {
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE);
}
serial = GetRandomSerialNumber();
// Test with sending random string
commandResponse = "0";
radio->sendTerminalResponseToSim(serial, commandResponse);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
ASSERT_TRUE(CheckGeneralError() ||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS);
}
}
/*
@ -158,20 +124,4 @@ TEST_F(RadioHidlTest, sendEnvelopeWithStatus) {
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
}
// Test with sending random string
serial = GetRandomSerialNumber();
contents = "0";
radio->sendEnvelopeWithStatus(serial, contents);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckGeneralError() ||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
}
}