Skip to content

Commit 5a8a598

Browse files
authored
Merge pull request #8611 from AnttiKauppila/ut_fix
Unittest fixes
2 parents ff007bc + 8cdf1d3 commit 5a8a598

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
@@ -190,6 +190,7 @@ TEST_F(Test_LoRaPHYCN470, rx_config)
190190
TEST_F(Test_LoRaPHYCN470, tx_config)
191191
{
192192
tx_config_params_t p;
193+
memset(&p, 0, sizeof(p));
193194
int8_t tx = 0;
194195
lorawan_time_t time = 0;
195196
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)