Merge pull request #11132 from kivaisan/fix_mbed_assert_for_unittests

Fix MBED_ASSERT for UTs
pull/11150/head
Seppo Takalo 2019-08-01 13:02:30 +03:00 committed by GitHub
commit 6722d8c804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -39,7 +39,12 @@ extern "C" {
* @param file File where assertation failed. * @param file File where assertation failed.
* @param line Failing assertation line number. * @param line Failing assertation line number.
*/ */
MBED_NORETURN void mbed_assert_internal(const char *expr, const char *file, int line); // mbed_assert_internal UT stub only prints an assert trace and returns, so therefore
// MBED_NORETURN must not be defined for UTs.
#ifndef UNITTEST
MBED_NORETURN
#endif
void mbed_assert_internal(const char *expr, const char *file, int line);
#ifdef __cplusplus #ifdef __cplusplus
} }
@ -132,4 +137,3 @@ do { \
/**@}*/ /**@}*/
/**@}*/ /**@}*/