Skip to content

Commit

Permalink
Merge pull request #11132 from kivaisan/fix_mbed_assert_for_unittests
Browse files Browse the repository at this point in the history
Fix MBED_ASSERT for UTs
  • Loading branch information
Seppo Takalo authored Aug 1, 2019
2 parents 417a9fe + 882c21b commit 6722d8c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions UNITTESTS/target_h/platform/mbed_assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -132,4 +137,3 @@ do { \
/**@}*/

/**@}*/

0 comments on commit 6722d8c

Please sign in to comment.