mirror of https://github.com/ARMmbed/mbed-os.git
unittests: Test_LoRaWANTimer.start: Fix test failure
We weren't initialising the mocks correctly, so an MBED_ASSERT failed in `LoRaWANTimer::start` because the "timer_id" was not set.pull/14948/head
parent
162ae220b1
commit
07aefbc6bc
|
@ -71,9 +71,12 @@ TEST_F(Test_LoRaWANTimer, init)
|
||||||
|
|
||||||
TEST_F(Test_LoRaWANTimer, start)
|
TEST_F(Test_LoRaWANTimer, start)
|
||||||
{
|
{
|
||||||
equeue_stub.void_ptr = NULL;
|
struct equeue_event ptr;
|
||||||
|
equeue_stub.void_ptr = &ptr;
|
||||||
timer_event_t ev;
|
timer_event_t ev;
|
||||||
memset(&ev, 0, sizeof(ev));
|
memset(&ev, 0, sizeof(ev));
|
||||||
|
object->init(ev, my_callback);
|
||||||
|
equeue_stub.call_cb_immediately = true;
|
||||||
object->start(ev, 10);
|
object->start(ev, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue