Make TEST_VALID_PARAM() available unconditionally
This commit is contained in:
parent
aae10fa427
commit
54e7f312d3
1 changed files with 7 additions and 1 deletions
|
@ -171,6 +171,7 @@ typedef enum
|
|||
} \
|
||||
memcpy(param_fail_jmp, jmp_tmp, sizeof(jmp_buf)); \
|
||||
} while( 0 )
|
||||
#endif /* MBEDTLS_CHECK_PARAMS && !MBEDTLS_PARAM_FAILED_ALT */
|
||||
|
||||
/**
|
||||
* \brief This macro tests the statement passed to it as a test step or
|
||||
|
@ -195,11 +196,16 @@ typedef enum
|
|||
* accept is best done by using TEST_ASSERT() and checking the return
|
||||
* value as well.
|
||||
*
|
||||
* Note: this macro is available even when #MBEDTLS_CHECK_PARAMS is
|
||||
* disabled, as it makes sense to check that the functions accept all
|
||||
* legal values even if this option is disabled - only in that case,
|
||||
* the test if more about whether the function segfaults than about
|
||||
* whether it invokes MBEDTLS_PARAM_FAILED().
|
||||
*
|
||||
* \param TEST The test expression to be tested.
|
||||
*/
|
||||
#define TEST_VALID_PARAM( TEST ) \
|
||||
TEST_ASSERT( ( TEST, 1 ) );
|
||||
#endif /* MBEDTLS_CHECK_PARAMS && !MBEDTLS_PARAM_FAILED_ALT */
|
||||
|
||||
#define assert(a) if( !( a ) ) \
|
||||
{ \
|
||||
|
|
Loading…
Reference in a new issue