| /** |
| * \file test_common.h |
| * |
| * \brief Common things for all Mbed TLS and TF-PSA-Crypto test code. |
| * |
| * Include this header first in all headers in `include/test/`. |
| * Include this or another header from `include/test/` in all test C files. |
| */ |
| |
| /* |
| * Copyright The Mbed TLS Contributors |
| * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| */ |
| |
| #ifndef TEST_TEST_COMMON_H |
| #define TEST_TEST_COMMON_H |
| |
| /* On Mingw-w64, force the use of a C99-compliant printf() and friends. |
| * This is necessary on older versions of Mingw and/or Windows runtimes |
| * where snprintf does not always zero-terminate the buffer, and does |
| * not support formats such as "%zu" for size_t and "%lld" for long long. |
| */ |
| #if !defined(__USE_MINGW_ANSI_STDIO) |
| #define __USE_MINGW_ANSI_STDIO 1 |
| #endif |
| |
| #include <mbedtls/build_info.h> |
| |
| /* Most fields of publicly available structs are private and are wrapped with |
| * MBEDTLS_PRIVATE macro. This define allows tests to access the private fields |
| * directly (without using the MBEDTLS_PRIVATE wrapper). */ |
| #define MBEDTLS_ALLOW_PRIVATE_ACCESS |
| |
| #endif /* TEST_TEST_COMMON_H */ |