From 0a944f0ac499f206f0c53a9b9fadb36937192477 Mon Sep 17 00:00:00 2001 From: Jaeden Amero Date: Thu, 22 Jul 2021 17:54:54 +0100 Subject: [PATCH] test: lorawanstack: Use valid message type We previously made up an invalid message type, which was roughly `MCPS_MULTICAST | 0x40`. This causes an MBED_ASSERT failure in the handle_rx function, as it uses an assert to validate the message type passed to it (in convert_to_msg_flag()). Use the valid message type MCPS_MULTICAST instead in the handle_rx unit test. --- .../features/lorawan/lorawanstack/Test_LoRaWANStack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp index 13aca435fb..4903dd75b5 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp @@ -554,7 +554,7 @@ TEST_F(Test_LoRaWANStack, handle_rx) } ind.buffer = ind_buf; ind.buffer_size = 50; - ind.type = mcps_type_t(66); + ind.type = MCPS_MULTICAST; radio._ev->rx_done(NULL, 0, 0, 0); EXPECT_TRUE(50 == object->handle_rx(data, 50, port, flags, false)); EXPECT_EQ(10, data[10]);