1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Add ASSERT_FALSE macro for tests

Signed-off-by: Agathiyan Bragadeesh <agathiyan.bragadeesh2@arm.com>
This commit is contained in:
Agathiyan Bragadeesh
2023-07-14 17:28:27 +01:00
parent db084d16ea
commit ebb40bc336
10 changed files with 27 additions and 17 deletions

View File

@ -61,6 +61,16 @@
} \
} while (0)
/** This macro asserts fails the test with given output message.
*
* \param MESSAGE The message to be outputed on assertion
*/
#define ASSERT_FALSE(MESSAGE) \
do { \
mbedtls_test_fail(MESSAGE, __LINE__, __FILE__); \
goto exit; \
} while (0) \
/** Evaluate two integer expressions and fail the test case if they have
* different values.
*