1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

For tests, rename TEST_CALLOC_OR_FAIL() to just TEST_CALLOC()

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
Tom Cosgrove
2023-09-04 11:20:19 +01:00
parent 20e27de0bb
commit 30ceb23f3e
27 changed files with 150 additions and 150 deletions

View File

@ -143,7 +143,7 @@
* This expression may be evaluated multiple times.
*
*/
#define TEST_CALLOC_OR_FAIL(pointer, length) \
#define TEST_CALLOC(pointer, length) \
do { \
TEST_ASSERT((pointer) == NULL); \
if ((length) != 0) { \
@ -154,11 +154,11 @@
} while (0)
/* For backwards compatibility */
#define ASSERT_ALLOC(pointer, length) TEST_CALLOC_OR_FAIL(pointer, length)
#define ASSERT_ALLOC(pointer, length) TEST_CALLOC(pointer, length)
/** Allocate memory dynamically. If the allocation fails, skip the test case.
*
* This macro behaves like #TEST_CALLOC_OR_FAIL, except that if the allocation
* This macro behaves like #TEST_CALLOC, except that if the allocation
* fails, it marks the test as skipped rather than failed.
*/
#define TEST_CALLOC_OR_SKIP(pointer, length) \