Merge "Fix vts tests:" into oc-dev

am: 14b34e19d6

Change-Id: Ib2f1a77ece04254a73cdd69c9a46206593c5d4a9
This commit is contained in:
Shuo Qian 2017-06-12 04:48:29 +00:00 committed by android-build-merger
commit 01cb1ff6d7
3 changed files with 28 additions and 14 deletions

View file

@ -184,7 +184,7 @@ TEST_F(RadioHidlTest, setBandMode) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
}
}
@ -216,7 +216,7 @@ TEST_F(RadioHidlTest, setPreferredNetworkType) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
}
}
@ -441,8 +441,10 @@ TEST_F(RadioHidlTest, setCdmaSubscriptionSource) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::SIM_ABSENT ||
radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_AVAILABLE);
std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::SIM_ABSENT ||
radioRsp->rspInfo.error == RadioError::SUBSCRIPTION_NOT_AVAILABLE ||
radioRsp->rspInfo.error == RadioError::NONE);
}
}
@ -508,7 +510,7 @@ TEST_F(RadioHidlTest, nvReadItem) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
}
}
@ -527,7 +529,7 @@ TEST_F(RadioHidlTest, nvWriteItem) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
}
}
@ -544,7 +546,7 @@ TEST_F(RadioHidlTest, nvWriteCdmaPrl) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
}
}
@ -598,7 +600,7 @@ TEST_F(RadioHidlTest, getHardwareConfig) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE);
}
}
@ -649,6 +651,7 @@ TEST_F(RadioHidlTest, setRadioCapability) {
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::INVALID_STATE);
@ -667,6 +670,7 @@ TEST_F(RadioHidlTest, startLceService) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
radioRsp->rspInfo.error == RadioError::LCE_NOT_SUPPORTED ||
radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
@ -743,7 +747,7 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
}
/* Reset back to no carrier restriction */
@ -757,7 +761,7 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
}
}
@ -773,7 +777,7 @@ TEST_F(RadioHidlTest, getAllowedCarriers) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
}
}
@ -823,6 +827,7 @@ TEST_F(RadioHidlTest, setSimCardPower) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
}

View file

@ -34,8 +34,10 @@ TEST_F(RadioHidlTest, sendEnvelope) {
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::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE);
}
// Test with sending random string
@ -49,8 +51,10 @@ TEST_F(RadioHidlTest, sendEnvelope) {
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::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE);
}
}
@ -70,7 +74,10 @@ TEST_F(RadioHidlTest, sendTerminalResponseToSim) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
ASSERT_TRUE(CheckGeneralError() ||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE);
}
serial = GetRandomSerialNumber();
@ -85,6 +92,7 @@ TEST_F(RadioHidlTest, sendTerminalResponseToSim) {
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);
}

View file

@ -365,6 +365,7 @@ TEST_F(RadioHidlTest, sendCDMAFeatureCode) {
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 ||