Cellular: fixed unit tests after rebasing with master.

pull/7269/head
Teppo Järvelin 2018-06-20 09:02:47 +03:00
parent 861867e3cc
commit 1fb4d2dfc9
7 changed files with 18 additions and 3 deletions

View File

@ -21,6 +21,7 @@ TEST_SRC_FILES = \
../../stubs/us_ticker_stub.cpp \
../../stubs/mbed_assert_stub.cpp \
../../stubs/SocketAddress_stub.cpp \
../../stubs/randLIB_stub.cpp \
include ../../MakefileWorker.mk

View File

@ -57,7 +57,7 @@ void Test_AT_CellularSMS::test_AT_CellularSMS_initialize()
AT_CellularSMS sms(at);
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_AUTH_FAILURE;
CHECK(NSAPI_ERROR_AUTH_FAILURE == sms.initialize(CellularSMS::CellularSMSMmodeText));
CHECK(NSAPI_ERROR_NO_MEMORY == sms.initialize(CellularSMS::CellularSMSMmodeText));
}

View File

@ -41,3 +41,7 @@ device_err_t AT_CellularBase::get_device_error() const
return AT_CellularBase_stub::device_err_value;
}
bool AT_CellularBase::is_supported(SupportedFeature feature)
{
return true;
}

View File

@ -42,3 +42,8 @@ nsapi_error_t AT_CellularInformation::get_revision(char *buf, size_t buf_size)
{
return 0;
}
nsapi_error_t AT_CellularInformation::get_serial_number(char *buf, size_t buf_size, SerialNumberType type)
{
return 0;
}

View File

@ -52,3 +52,8 @@ nsapi_error_t AT_CellularSIM::get_imsi(char* imsi)
{
return NSAPI_ERROR_OK;
}
nsapi_error_t AT_CellularSIM::get_iccid(char *buf, size_t buf_size)
{
return NSAPI_ERROR_OK;
}

View File

@ -92,7 +92,7 @@ public:
*
* @return zero on success
*/
virtual nsapi_error_t set_power_level(int func_level, int do_reset = 1) = 0;
virtual nsapi_error_t set_power_level(int func_level, int do_reset = 0) = 0;
/** Reset and wake-up cellular device.
*

View File

@ -41,7 +41,7 @@ public:
virtual nsapi_error_t set_at_mode();
virtual nsapi_error_t set_power_level(int func_level, int do_reset = 1);
virtual nsapi_error_t set_power_level(int func_level, int do_reset = 0);
virtual nsapi_error_t reset();