From 334c02f7d471a5fabf764d1c8ae7a0e47af16eaa Mon Sep 17 00:00:00 2001 From: Martin Kojtal <0xc0170@gmail.com> Date: Fri, 30 Jun 2017 09:56:17 +0100 Subject: [PATCH] Cellular: not-supported error if MODEM_ON_BOARD not defined If a test is empty, it leads to undef. Therefore if a test requires additional details, it should print an error [NOT SUPPORTED]. --- .../TESTS/unit_tests/default/main.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/features/netsocket/cellular/generic_modem_driver/TESTS/unit_tests/default/main.cpp b/features/netsocket/cellular/generic_modem_driver/TESTS/unit_tests/default/main.cpp index 3f9009ac55c..037c692963f 100644 --- a/features/netsocket/cellular/generic_modem_driver/TESTS/unit_tests/default/main.cpp +++ b/features/netsocket/cellular/generic_modem_driver/TESTS/unit_tests/default/main.cpp @@ -14,7 +14,9 @@ * limitations under the License. */ -#if MODEM_ON_BOARD +#if !MODEM_ON_BOARD +#error [NOT_SUPPORTED] MODEM_ON_BOARD should be set for this test to be functional +#endif #include "mbed.h" #include "gmd_ut_config_header.h" @@ -436,14 +438,3 @@ static void unlock() { mtx.unlock(); } - -#else - -int main () -{ - return 0; -} - -#endif //MODEM_ON_BOARD -// End Of File -