Unittest fixes

pull/8611/head
Antti Kauppila 2018-11-01 14:57:18 +02:00
parent b1904a5d65
commit 8cdf1d34fc
2 changed files with 4 additions and 0 deletions

View File

@ -190,6 +190,7 @@ TEST_F(Test_LoRaPHYCN470, rx_config)
TEST_F(Test_LoRaPHYCN470, tx_config)
{
tx_config_params_t p;
memset(&p, 0, sizeof(p));
int8_t tx = 0;
lorawan_time_t time = 0;
p.tx_power = 9;

View File

@ -63,18 +63,21 @@ void my_callback()
TEST_F(Test_LoRaWANTimer, init)
{
timer_event_t ev;
memset(&ev, 0, sizeof(ev));
object->init(ev, my_callback);
}
TEST_F(Test_LoRaWANTimer, start)
{
timer_event_t ev;
memset(&ev, 0, sizeof(ev));
object->start(ev, 10);
}
TEST_F(Test_LoRaWANTimer, stop)
{
timer_event_t ev;
memset(&ev, 0, sizeof(ev));
ev.timer_id = 4;
object->stop(ev);
EXPECT_TRUE(ev.timer_id == 0);