mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
- A error_strerror function() has been added to translate between error codes and their description.
- The error codes have been remapped and combining error codes is now done with a PLUS instead of an OR as error codes used are negative. - Descriptions to all error codes have been added. - Generation script for error.c has been created to automatically generate error.c from the available error definitions in the headers.
This commit is contained in:
14
tests/suites/test_suite_error.function
Normal file
14
tests/suites/test_suite_error.function
Normal file
@ -0,0 +1,14 @@
|
||||
BEGIN_HEADER
|
||||
#include <polarssl/error.h>
|
||||
END_HEADER
|
||||
|
||||
BEGIN_CASE
|
||||
error_strerror:code:result_str
|
||||
{
|
||||
char buf[500];
|
||||
|
||||
error_strerror( {code}, buf, 500 );
|
||||
|
||||
TEST_ASSERT( strcmp( buf, {result_str} ) == 0 );
|
||||
}
|
||||
END_CASE
|
Reference in New Issue
Block a user