mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-14 07:20:52 +00:00
Add testcase for MBEDTLS_PRINTF_MS_TIME
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
c6a8bf0f8e
commit
154066d118
@ -5,6 +5,9 @@ printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_SIZET:sizeof(size_t):0:"0"
|
||||
printf "%" MBEDTLS_PRINTF_LONGLONG, 0
|
||||
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_LONGLONG:sizeof(long long):0:"0"
|
||||
|
||||
printf "%" MBEDTLS_PRINTF_MS_TIME, 0
|
||||
printf_int_expr:(uintptr_t) "%" MBEDTLS_PRINTF_MS_TIME:MBEDTLS_MS_TIME_SIZE:0:"0"
|
||||
|
||||
Debug print msg (threshold 1, level 0)
|
||||
debug_print_msg_threshold:1:0:"MyFile":999:"MyFile(0999)\: Text message, 2 == 2\n"
|
||||
|
||||
|
@ -4,6 +4,15 @@
|
||||
#include "mbedtls/pk.h"
|
||||
#include <test/ssl_helpers.h>
|
||||
|
||||
// Use a macro instead of sizeof(mbedtls_ms_time_t) because the expression store
|
||||
// doesn't exclude entries based on depends_on headers, which would cause failures
|
||||
// in builds without MBEDTLS_HAVE_TIME
|
||||
#if defined(MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO)
|
||||
# define MBEDTLS_MS_TIME_SIZE sizeof(MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO)
|
||||
#else
|
||||
# define MBEDTLS_MS_TIME_SIZE sizeof(int64_t)
|
||||
#endif
|
||||
|
||||
struct buffer_data {
|
||||
char buf[2000];
|
||||
char *ptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user