Skip to content

Commit

Permalink
unittests: Test_LoRaWANTimer.start: Fix test failure
Browse files Browse the repository at this point in the history
We weren't initialising the mocks correctly, so an MBED_ASSERT failed in
`LoRaWANTimer::start` because the "timer_id" was not set.
  • Loading branch information
rwalton-arm committed Jul 26, 2021
1 parent 0b711a4 commit 94c527c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 94c527c

Please sign in to comment.