More informative message on invalid classification flags

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-04-21 20:04:24 +02:00
parent e02263da34
commit a5a800dce0

View file

@ -61,7 +61,14 @@
#define KEY_LIFETIME_IS_VOLATILE ( 1u << 0 )
#define TEST_CLASSIFICATION_MACRO( flag, alg, flags ) \
TEST_ASSERT( PSA_##flag( alg ) == !! ( ( flags ) & flag ) )
do \
{ \
if( ( flags ) & ( flag ) ) \
TEST_ASSERT( PSA_##flag( alg ) ); \
else \
TEST_ASSERT( ! PSA_##flag( alg ) ); \
} \
while( 0 )
/* Check the parity of value.
*