mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13069 from AriParkkila/fix-unittest-for-CellularNetwork
Cellular: Fix unittest for CellularNetworkpull/13095/head
commit
12910eabbe
|
@ -364,7 +364,7 @@ TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_get_network_registering_m
|
|||
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_DEVICE_ERROR;
|
||||
mode = CellularNetwork::NWModeManual;
|
||||
EXPECT_TRUE(NSAPI_ERROR_DEVICE_ERROR == cn.get_network_registering_mode(mode));
|
||||
EXPECT_TRUE(mode == -1);
|
||||
EXPECT_TRUE(mode == CellularNetwork::NWModeManual);
|
||||
}
|
||||
|
||||
TEST_F(TestAT_CellularNetwork, test_AT_CellularNetwork_set_registration_urc)
|
||||
|
|
|
@ -200,7 +200,7 @@ public:
|
|||
|
||||
/** Get the current network registering mode
|
||||
*
|
||||
* @param mode on successful return contains the current network registering mode
|
||||
* @param mode on success the current network registering mode, otherwise unchanged
|
||||
* @return NSAPI_ERROR_OK on success
|
||||
* NSAPI_ERROR_DEVICE_ERROR on failure
|
||||
*/
|
||||
|
|
|
@ -202,7 +202,9 @@ nsapi_error_t AT_CellularNetwork::get_network_registering_mode(NWRegisteringMode
|
|||
{
|
||||
int ret;
|
||||
nsapi_error_t error = _at.at_cmd_int("+COPS", "?", ret);
|
||||
if (error == NSAPI_ERROR_OK) {
|
||||
mode = (NWRegisteringMode)ret;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue