test_suite_error.function 378 B

123456789101112131415161718192021
  1. /* BEGIN_HEADER */
  2. #include "mbedtls/error.h"
  3. /* END_HEADER */
  4. /* BEGIN_DEPENDENCIES
  5. * depends_on:MBEDTLS_ERROR_C
  6. * END_DEPENDENCIES
  7. */
  8. /* BEGIN_CASE */
  9. void error_strerror( int code, char * result_str )
  10. {
  11. char buf[500];
  12. memset( buf, 0, sizeof( buf ) );
  13. mbedtls_strerror( code, buf, 500 );
  14. TEST_ASSERT( strcmp( buf, result_str ) == 0 );
  15. }
  16. /* END_CASE */