xref: /aosp_15_r20/external/mbedtls/tests/suites/test_suite_error.function (revision 62c56f9862f102b96d72393aff6076c951fb8148)
1/* BEGIN_HEADER */
2#include "mbedtls/error.h"
3/* END_HEADER */
4
5/* BEGIN_DEPENDENCIES
6 * depends_on:MBEDTLS_ERROR_C
7 * END_DEPENDENCIES
8 */
9
10/* BEGIN_CASE */
11void error_strerror(int code, char *result_str)
12{
13    char buf[500];
14
15    memset(buf, 0, sizeof(buf));
16
17    mbedtls_strerror(code, buf, 500);
18
19    TEST_ASSERT(strcmp(buf, result_str) == 0);
20}
21/* END_CASE */
22