1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

For tests, rename ASSERT_COMPARE() to TEST_BUFFERS_EQUAL()

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
Tom Cosgrove
2023-07-20 16:46:01 +01:00
parent ed70fd0c39
commit 65cd8519f7
39 changed files with 418 additions and 416 deletions

View File

@@ -34,7 +34,7 @@ void printf_int(char *format, /* any format expecting one int argument, e.g. "%d
/* Nominal case: buffer just large enough */
ASSERT_ALLOC(output, n + 1);
TEST_EQUAL(n, mbedtls_snprintf(output, n + 1, format, x));
ASSERT_COMPARE(result, n + 1, output, n + 1);
TEST_BUFFERS_EQUAL(result, n + 1, output, n + 1);
mbedtls_free(output);
output = NULL;
@@ -59,7 +59,7 @@ void printf_long_max(const char *format, /* "%lx" or longer type */
ASSERT_ALLOC(output, n + 1);
TEST_EQUAL(n, mbedtls_snprintf(output, n + 1, format, value));
ASSERT_COMPARE(expected, n + 1, output, n + 1);
TEST_BUFFERS_EQUAL(expected, n + 1, output, n + 1);
mbedtls_free(output);
output = NULL;
@@ -79,7 +79,7 @@ void printf_char2(char *format, /* "%c%c" */
/* Nominal case: buffer just large enough */
ASSERT_ALLOC(output, n + 1);
TEST_EQUAL(n, mbedtls_snprintf(output, n + 1, format, arg1, arg2));
ASSERT_COMPARE(result, n + 1, output, n + 1);
TEST_BUFFERS_EQUAL(result, n + 1, output, n + 1);
mbedtls_free(output);
output = NULL;