mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "check all active ports"
This commit is contained in:
@@ -238,12 +238,24 @@ TEST_P(RadioConfigTest, checkPortInfoExistsAndPortActive) {
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_config->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_config->rspInfo.serial);
|
||||
if (radioRsp_config->rspInfo.error == RadioError::NONE) {
|
||||
uint8_t simCount = 0;
|
||||
// check if cardState is present, portInfo size should be more than 0
|
||||
for (const SimSlotStatus& slotStatusResponse : radioRsp_config->simSlotStatus) {
|
||||
if (slotStatusResponse.cardState == CardStatus::STATE_PRESENT) {
|
||||
ASSERT_TRUE(slotStatusResponse.portInfo.size() > 0);
|
||||
ASSERT_TRUE(slotStatusResponse.portInfo[0].portActive);
|
||||
for (const SimPortInfo& simPortInfo : slotStatusResponse.portInfo) {
|
||||
if (simPortInfo.portActive) {
|
||||
simCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isSsSsEnabled()) {
|
||||
EXPECT_EQ(1, simCount);
|
||||
} else if (isDsDsEnabled()) {
|
||||
EXPECT_EQ(2, simCount);
|
||||
} else if (isTsTsEnabled()) {
|
||||
EXPECT_EQ(3, simCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user