mirror of https://github.com/ARMmbed/mbed-os.git
Allow unit tests to be compiled with -fno-exception
parent
4095c65e31
commit
568ffbf22a
|
@ -26,7 +26,11 @@ extern "C" void mbed_assert_internal(const char *expr, const char *file, int lin
|
||||||
{
|
{
|
||||||
fprintf(stderr, "mbed assertation failed: %s, file: %s, line %d \n", expr, file, line);
|
fprintf(stderr, "mbed assertation failed: %s, file: %s, line %d \n", expr, file, line);
|
||||||
if (mbed_assert_throw_errors) {
|
if (mbed_assert_throw_errors) {
|
||||||
|
#ifdef __EXCEPTIONS
|
||||||
throw 1;
|
throw 1;
|
||||||
|
#else
|
||||||
|
FAIL();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure we fail the unit test if the Mbed assertion fails. Without this,
|
/* Ensure we fail the unit test if the Mbed assertion fails. Without this,
|
||||||
|
|
Loading…
Reference in New Issue