From 67901bf2ce7b5c87985f4f7e0eb51c0518b2491e Mon Sep 17 00:00:00 2001 From: sqian Date: Fri, 28 Jul 2017 11:28:27 -0700 Subject: [PATCH] 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 --- .../vts/functional/radio_hidl_hal_misc.cpp | 3 +- .../1.0/vts/functional/radio_hidl_hal_stk.cpp | 50 ------------------- 2 files changed, 2 insertions(+), 51 deletions(-) diff --git a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp index b31ca48af5..ad892acd8a 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp @@ -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); } } diff --git a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp index 7692d65ed3..261f534afc 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp @@ -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(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(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); - } }