diff options
author | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | 2018-12-12 11:56:09 +0100 |
---|---|---|
committer | Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com> | 2018-12-12 11:56:09 +0100 |
commit | 54e7f312d33581a83e4dde3fbf5750ffbf5d322f (patch) | |
tree | e836523f13efe3cd26329be6dfa1a2ba66413ae9 | |
parent | aae10fa4275d9d9414bcfa81414b8a48c853c9b2 (diff) | |
download | mbedtls-54e7f312d33581a83e4dde3fbf5750ffbf5d322f.zip mbedtls-54e7f312d33581a83e4dde3fbf5750ffbf5d322f.tar.gz mbedtls-54e7f312d33581a83e4dde3fbf5750ffbf5d322f.tar.bz2 |
Make TEST_VALID_PARAM() available unconditionally
-rw-r--r-- | tests/suites/helpers.function | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/suites/helpers.function b/tests/suites/helpers.function index 1ce17f5..891fba6 100644 --- a/tests/suites/helpers.function +++ b/tests/suites/helpers.function @@ -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 ) ) \ { \ |