Skip to content

Commit bd90664

Browse files
author
Antti Kauppila
committed
LoRaWANStack unit tested
1 parent e07940d commit bd90664

File tree

9 files changed

+802
-130
lines changed

9 files changed

+802
-130
lines changed

UNITTESTS/features/lorawan/loramaccommand/Test_LoRaMacCommand.cpp

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ TEST_F(Test_LoRaMacCommand, parse_mac_commands_to_repeat)
6969
uint8_t buf[20];
7070

7171
object->parse_mac_commands_to_repeat();
72-
EXPECT_TRUE(object->is_mac_command_in_next_tx() == false);
7372

7473
buf[0] = 2;
7574
buf[1] = 16;
@@ -120,7 +119,6 @@ TEST_F(Test_LoRaMacCommand, parse_mac_commands_to_repeat)
120119
EXPECT_TRUE(object->process_mac_commands(buf, 0, 4, 0, mlme, params, phy) == LORAWAN_STATUS_OK);
121120

122121
object->parse_mac_commands_to_repeat();
123-
EXPECT_TRUE(object->is_mac_command_in_next_tx() == true);
124122
}
125123

126124
TEST_F(Test_LoRaMacCommand, clear_repeat_buffer)
@@ -158,42 +156,6 @@ TEST_F(Test_LoRaMacCommand, get_repeat_commands_length)
158156
EXPECT_TRUE(object->get_repeat_commands_length() == 0 );
159157
}
160158

161-
TEST_F(Test_LoRaMacCommand, clear_mac_commands_in_next_tx)
162-
{
163-
loramac_mlme_confirm_t mlme;
164-
lora_mac_system_params_t params;
165-
my_LoRaPHY phy;
166-
uint8_t buf[20];
167-
168-
EXPECT_TRUE(object->is_mac_command_in_next_tx() == false);
169-
170-
buf[0] = 4;
171-
buf[1] = 16;
172-
buf[2] = 32;
173-
EXPECT_TRUE(object->process_mac_commands(buf, 0, 1, 0, mlme, params, phy) == LORAWAN_STATUS_OK);
174-
175-
EXPECT_TRUE(object->is_mac_command_in_next_tx() == true);
176-
object->clear_mac_commands_in_next_tx();
177-
EXPECT_TRUE(object->is_mac_command_in_next_tx() == false);
178-
}
179-
180-
TEST_F(Test_LoRaMacCommand, is_mac_command_in_next_tx)
181-
{
182-
loramac_mlme_confirm_t mlme;
183-
lora_mac_system_params_t params;
184-
my_LoRaPHY phy;
185-
uint8_t buf[20];
186-
187-
EXPECT_TRUE(object->is_mac_command_in_next_tx() == false);
188-
189-
buf[0] = 4;
190-
buf[1] = 16;
191-
buf[2] = 32;
192-
EXPECT_TRUE(object->process_mac_commands(buf, 0, 1, 0, mlme, params, phy) == LORAWAN_STATUS_OK);
193-
194-
EXPECT_TRUE(object->is_mac_command_in_next_tx() == true);
195-
}
196-
197159
TEST_F(Test_LoRaMacCommand, clear_sticky_mac_cmd)
198160
{
199161
loramac_mlme_confirm_t mlme;
@@ -375,27 +337,6 @@ TEST_F(Test_LoRaMacCommand, process_mac_commands)
375337
EXPECT_TRUE(object->process_mac_commands(buf, 0, 1, 0, mlme, params, phy) == LORAWAN_STATUS_UNSUPPORTED);
376338
}
377339

378-
TEST_F(Test_LoRaMacCommand, is_sticky_mac_command_pending)
379-
{
380-
loramac_mlme_confirm_t mlme;
381-
lora_mac_system_params_t params;
382-
my_LoRaPHY phy;
383-
uint8_t buf[20];
384-
385-
EXPECT_TRUE(object->is_sticky_mac_command_pending() == false);
386-
387-
object->clear_command_buffer();
388-
buf[0] = 5;
389-
buf[1] = 2;
390-
buf[2] = 2;
391-
buf[3] = 2;
392-
buf[4] = 2;
393-
buf[5] = 2;
394-
EXPECT_TRUE(object->process_mac_commands(buf, 0, 5, 0, mlme, params, phy) == LORAWAN_STATUS_OK);
395-
object->parse_mac_commands_to_repeat();
396-
EXPECT_TRUE(object->is_sticky_mac_command_pending() == true);
397-
}
398-
399340
TEST_F(Test_LoRaMacCommand, add_link_check_req)
400341
{
401342
object->add_link_check_req();

0 commit comments

Comments
 (0)