Skip to content

Commit 45c0fa1

Browse files
Antti KauppilaCruz Monrreal II
authored andcommitted
Unittest fixes
1 parent 1bbe608 commit 45c0fa1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ TEST_F(Test_LoRaPHYCN470, rx_config)
148148
TEST_F(Test_LoRaPHYCN470, tx_config)
149149
{
150150
tx_config_params_t p;
151+
memset(&p, 0, sizeof(p));
151152
int8_t tx = 0;
152153
lorawan_time_t time = 0;
153154
p.tx_power = 9;

UNITTESTS/features/lorawan/lorawantimer/Test_LoRaWANTimer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,21 @@ void my_callback()
6363
TEST_F(Test_LoRaWANTimer, init)
6464
{
6565
timer_event_t ev;
66+
memset(&ev, 0, sizeof(ev));
6667
object->init(ev, my_callback);
6768
}
6869

6970
TEST_F(Test_LoRaWANTimer, start)
7071
{
7172
timer_event_t ev;
73+
memset(&ev, 0, sizeof(ev));
7274
object->start(ev, 10);
7375
}
7476

7577
TEST_F(Test_LoRaWANTimer, stop)
7678
{
7779
timer_event_t ev;
80+
memset(&ev, 0, sizeof(ev));
7881
ev.timer_id = 4;
7982
object->stop(ev);
8083
EXPECT_TRUE(ev.timer_id == 0);

0 commit comments

Comments
 (0)