quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

psa_helpers.h (630B)


      1 /*
      2  * Helper functions for tests that use any PSA API.
      3  */
      4 /*
      5  *  Copyright The Mbed TLS Contributors
      6  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
      7  */
      8 
      9 #ifndef PSA_HELPERS_H
     10 #define PSA_HELPERS_H
     11 
     12 #if defined(MBEDTLS_PSA_CRYPTO_SPM)
     13 #include "spm/psa_defs.h"
     14 #endif
     15 
     16 /** Evaluate an expression and fail the test case if it returns an error.
     17  *
     18  * \param expr      The expression to evaluate. This is typically a call
     19  *                  to a \c psa_xxx function that returns a value of type
     20  *                  #psa_status_t.
     21  */
     22 #define PSA_ASSERT(expr) TEST_EQUAL((expr), PSA_SUCCESS)
     23 
     24 #endif /* PSA_HELPERS_H */