mirror of https://github.com/ARMmbed/mbed-os.git
Fix MBED_ASSERT for UTs
For UTs mbed_assert_internal should not be declared as MBED_NORETURN as UT stub for mbed_assert_internal only prints out the assert trace and returns back to original code.pull/11132/head
parent
417a9fe2fb
commit
882c21bf0b
|
@ -39,7 +39,12 @@ extern "C" {
|
|||
* @param file File where assertation failed.
|
||||
* @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
|
||||
}
|
||||
|
@ -132,4 +137,3 @@ do { \
|
|||
/**@}*/
|
||||
|
||||
/**@}*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue