Make TEST_VALID_PARAM() available unconditionally
@@ -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 ) ) \
{ \
