mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-05 06:26:52 +00: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:
parent
412a813ad4
commit
05b2a87ea0
40 changed files with 339 additions and 339 deletions
|
|
@ -32,7 +32,7 @@ void printf_int(char *format, /* any format expecting one int argument, e.g. "%d
|
|||
const size_t n = strlen(result);
|
||||
|
||||
/* Nominal case: buffer just large enough */
|
||||
TEST_CALLOC_OR_FAIL(output, n + 1);
|
||||
TEST_CALLOC(output, n + 1);
|
||||
TEST_EQUAL(n, mbedtls_snprintf(output, n + 1, format, x));
|
||||
TEST_BUFFERS_EQUAL(result, n + 1, output, n + 1);
|
||||
mbedtls_free(output);
|
||||
|
|
@ -53,11 +53,11 @@ void printf_long_max(const char *format, /* "%lx" or longer type */
|
|||
const size_t n = sizeof(value) * 2;
|
||||
|
||||
/* We assume that long has no padding bits! */
|
||||
TEST_CALLOC_OR_FAIL(expected, n + 1);
|
||||
TEST_CALLOC(expected, n + 1);
|
||||
expected[0] = '7';
|
||||
memset(expected + 1, 'f', sizeof(value) * 2 - 1);
|
||||
|
||||
TEST_CALLOC_OR_FAIL(output, n + 1);
|
||||
TEST_CALLOC(output, n + 1);
|
||||
TEST_EQUAL(n, mbedtls_snprintf(output, n + 1, format, value));
|
||||
TEST_BUFFERS_EQUAL(expected, n + 1, output, n + 1);
|
||||
mbedtls_free(output);
|
||||
|
|
@ -77,7 +77,7 @@ void printf_char2(char *format, /* "%c%c" */
|
|||
const size_t n = strlen(result);
|
||||
|
||||
/* Nominal case: buffer just large enough */
|
||||
TEST_CALLOC_OR_FAIL(output, n + 1);
|
||||
TEST_CALLOC(output, n + 1);
|
||||
TEST_EQUAL(n, mbedtls_snprintf(output, n + 1, format, arg1, arg2));
|
||||
TEST_BUFFERS_EQUAL(result, n + 1, output, n + 1);
|
||||
mbedtls_free(output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue