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
Robert Walton 2021-07-26 23:28:12 +01:00 committed by Jaeden Amero
parent 162ae220b1
commit 07aefbc6bc
1 changed files with 4 additions and 1 deletions

View File

@ -71,9 +71,12 @@ TEST_F(Test_LoRaWANTimer, init)
TEST_F(Test_LoRaWANTimer, start)
{
equeue_stub.void_ptr = NULL;
struct equeue_event ptr;
equeue_stub.void_ptr = &ptr;
timer_event_t ev;
memset(&ev, 0, sizeof(ev));
object->init(ev, my_callback);
equeue_stub.call_cb_immediately = true;
object->start(ev, 10);
}