diff --git a/tests/suites/test_suite_pem.function b/tests/suites/test_suite_pem.function index b3b3e8d28..413dc551c 100644 --- a/tests/suites/test_suite_pem.function +++ b/tests/suites/test_suite_pem.function @@ -41,21 +41,21 @@ void mbedtls_pem_write_buffer_lengths() int ret; for (size_t l = 0; l <= sizeof(data); l++) { ret = mbedtls_pem_write_buffer("\n", "\n", data, l, NULL, 0, &olen_needed); - TEST_ASSERT(ret == MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL); + TEST_EQUAL(ret, MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL); /* Test that a bigger buffer still only requires `olen_needed` */ ret = mbedtls_pem_write_buffer("\n", "\n", data, l, buf, sizeof(buf), &olen); - TEST_ASSERT(ret == 0); - TEST_ASSERT(olen_needed == olen); + TEST_EQUAL(ret, 0); + TEST_EQUAL(olen_needed, olen); /* Test that a buffer of exactly `olen_needed` works */ memset(buf, 1, sizeof(buf)); ret = mbedtls_pem_write_buffer("\n", "\n", data, l, buf, olen_needed, &olen); - TEST_ASSERT(ret == 0); - TEST_ASSERT(olen_needed == olen); + TEST_EQUAL(ret, 0); + TEST_EQUAL(olen_needed, olen); /* Test the function didn't overflow the given buffer */ for (size_t i = olen_needed; i < sizeof(buf); i++) { - TEST_ASSERT(buf[i] == 1); + TEST_EQUAL(buf[i], 1); } } }