2013-08-20 09:48:36 +00:00
|
|
|
/* BEGIN_HEADER */
|
2024-10-21 11:05:20 +00:00
|
|
|
#include "mbedtls/error.h"
|
2013-08-20 09:48:36 +00:00
|
|
|
/* END_HEADER */
|
2011-05-09 16:17:09 +00:00
|
|
|
|
2013-08-20 09:48:36 +00:00
|
|
|
/* BEGIN_DEPENDENCIES
|
2024-10-21 11:05:20 +00:00
|
|
|
* depends_on:MBEDTLS_ERROR_C
|
2013-08-20 09:48:36 +00:00
|
|
|
* END_DEPENDENCIES
|
|
|
|
*/
|
2011-05-26 13:16:06 +00:00
|
|
|
|
2013-08-20 09:48:36 +00:00
|
|
|
/* BEGIN_CASE */
|
2023-01-11 13:50:10 +00:00
|
|
|
void error_strerror(int code, char *result_str)
|
2011-05-09 16:17:09 +00:00
|
|
|
{
|
|
|
|
char buf[500];
|
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
memset(buf, 0, sizeof(buf));
|
2014-03-27 17:49:32 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
mbedtls_strerror(code, buf, 500);
|
2011-05-09 16:17:09 +00:00
|
|
|
|
2023-01-11 13:50:10 +00:00
|
|
|
TEST_ASSERT(strcmp(buf, result_str) == 0);
|
2011-05-09 16:17:09 +00:00
|
|
|
}
|
2013-08-20 09:48:36 +00:00
|
|
|
/* END_CASE */
|