cmake Paths corrected

pull/8233/head
Antti Kauppila 2018-09-24 21:09:13 +03:00
parent f6ecb319d0
commit a54c271814
21 changed files with 25 additions and 21 deletions

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loramac/Test_LoRaMac.cpp features/lorawan/loramac/Test_LoRaMac.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/LoRaWANStack_stub.cpp stubs/LoRaWANStack_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loramacchannelplan/Test_LoRaMacChannelPlan.cpp features/lorawan/loramacchannelplan/Test_LoRaMacChannelPlan.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
) )

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loramaccommand/Test_LoRaMacCommand.cpp features/lorawan/loramaccommand/Test_LoRaMacCommand.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
) )

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loramaccrypto/Test_LoRaMacCrypto.cpp features/lorawan/loramaccrypto/Test_LoRaMacCrypto.cpp
stubs/cipher_stub.c stubs/cipher_stub.c
stubs/aes_stub.c stubs/aes_stub.c
stubs/cmac_stub.c stubs/cmac_stub.c

View File

@ -536,6 +536,7 @@ TEST_F(Test_LoRaPHY, set_next_channel)
uint8_t ch; uint8_t ch;
lorawan_time_t t1; lorawan_time_t t1;
lorawan_time_t t2; lorawan_time_t t2;
p.aggregate_timeoff = 10000;
EXPECT_TRUE(LORAWAN_STATUS_DUTYCYCLE_RESTRICTED == object->set_next_channel(&p, &ch, &t1, &t2)); EXPECT_TRUE(LORAWAN_STATUS_DUTYCYCLE_RESTRICTED == object->set_next_channel(&p, &ch, &t1, &t2));
uint16_t list[16]; uint16_t list[16];

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphy/Test_LoRaPHY.cpp features/lorawan/loraphy/Test_LoRaPHY.cpp
stubs/LoRaWANTimer_stub.cpp stubs/LoRaWANTimer_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c
) )

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/LoRaWANTimer_stub.cpp stubs/LoRaWANTimer_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -20,7 +20,7 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYAU915")
# Source files # Source files
set(unittest-sources set(unittest-sources
../features/lorawan/lorastack/phy/LoRaPHYAU915.cpp ../features/lorawan/lorastack/phy/LoRaPHYAU915.cpp
) )
# Add test specific include paths # Add test specific include paths
@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/LoRaWANTimer_stub.cpp stubs/LoRaWANTimer_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/LoRaWANTimer_stub.cpp stubs/LoRaWANTimer_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphycn779/Test_LoRaPHYCN779.cpp features/lorawan/loraphycn779/Test_LoRaPHYCN779.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphyeu433/Test_LoRaPHYEU433.cpp features/lorawan/loraphyeu433/Test_LoRaPHYEU433.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphyeu868/Test_LoRaPHYEU868.cpp features/lorawan/loraphyeu868/Test_LoRaPHYEU868.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphyin865/Test_LoRaPHYIN865.cpp features/lorawan/loraphyin865/Test_LoRaPHYIN865.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/LoRaWANTimer_stub.cpp stubs/LoRaWANTimer_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/LoRaWANTimer_stub.cpp stubs/LoRaWANTimer_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/LoRaWANStack_stub.cpp stubs/LoRaWANStack_stub.cpp
stubs/LoRaMac_stub.cpp stubs/LoRaMac_stub.cpp

View File

@ -419,6 +419,7 @@ TEST_F(Test_LoRaWANStack, handle_rx)
loramac_mcps_indication_t ind; loramac_mcps_indication_t ind;
LoRaMac_stub::mcps_ind_ptr = &ind; LoRaMac_stub::mcps_ind_ptr = &ind;
ind.status = LORAMAC_EVENT_INFO_STATUS_OK;
loramac_mlme_confirm_t mlme; loramac_mlme_confirm_t mlme;
LoRaMac_stub::mlme_conf_ptr = &mlme; LoRaMac_stub::mlme_conf_ptr = &mlme;
@ -442,6 +443,7 @@ TEST_F(Test_LoRaWANStack, handle_rx)
ind.buffer = ind_buf; ind.buffer = ind_buf;
ind.buffer_size = 150; ind.buffer_size = 150;
ind.type = MCPS_UNCONFIRMED; ind.type = MCPS_UNCONFIRMED;
ind.is_data_recvd = true;
radio._ev->rx_done(NULL, 0, 0, 0); radio._ev->rx_done(NULL, 0, 0, 0);
//data == NULL || LENGTH == 0 (2 cases) //data == NULL || LENGTH == 0 (2 cases)

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/lorawanstack/Test_LoRaWANStack.cpp features/lorawan/lorawanstack/Test_LoRaWANStack.cpp
stubs/LoRaPHY_stub.cpp stubs/LoRaPHY_stub.cpp
stubs/LoRaMac_stub.cpp stubs/LoRaMac_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c

View File

@ -31,7 +31,7 @@ set(unittest-includes ${unittest-includes}
# Test & stub files # Test & stub files
set(unittest-test-sources set(unittest-test-sources
../features/lorawan/lorawantimer/Test_LoRaWANTimer.cpp features/lorawan/lorawantimer/Test_LoRaWANTimer.cpp
stubs/EventQueue_stub.cpp stubs/EventQueue_stub.cpp
stubs/mbed_assert_stub.c stubs/mbed_assert_stub.c
stubs/equeue_stub.c stubs/equeue_stub.c

View File

@ -1064,8 +1064,8 @@ lorawan_status_t LoRaWANStack::state_controller(device_states_t new_state)
break; break;
default: default:
//Because this is internal function only coding error causes this //Because this is internal function only coding error causes this
tr_error("Unknown state: %d:", new_state);
MBED_ASSERT(false); MBED_ASSERT(false);
break;
} }
return status; return status;

View File

@ -33,7 +33,6 @@ SPDX-License-Identifier: BSD-3-Clause
*/ */
static const uint8_t max_eirp_table[] = { 8, 10, 12, 13, 14, 16, 18, 20, 21, 24, 26, 27, 29, 30, 33, 36 }; static const uint8_t max_eirp_table[] = { 8, 10, 12, 13, 14, 16, 18, 20, 21, 24, 26, 27, 29, 30, 33, 36 };
LoRaMacCommand::LoRaMacCommand() LoRaMacCommand::LoRaMacCommand()
{ {
sticky_mac_cmd = false; sticky_mac_cmd = false;
@ -93,7 +92,9 @@ void LoRaMacCommand::parse_mac_commands_to_repeat()
case MOTE_MAC_LINK_CHECK_REQ: { // 0 byte payload case MOTE_MAC_LINK_CHECK_REQ: { // 0 byte payload
break; break;
} }
default: {}//Cannot happen default: {
MBED_ASSERT(false);
}
} }
} }