mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-07 09:55:50 +00:00
test: use define for initializing ssl_message_queue struct
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
00a256f7b2
commit
7c0f91be10
@ -12,6 +12,8 @@
|
||||
#include <constant_time_internal.h>
|
||||
#include <test/constant_flow.h>
|
||||
|
||||
#define SSL_MESSAGE_QUEUE_INIT { NULL, 0, 0, 0 }
|
||||
|
||||
/* END_HEADER */
|
||||
|
||||
/* BEGIN_DEPENDENCIES
|
||||
@ -459,7 +461,7 @@ exit:
|
||||
/* BEGIN_CASE */
|
||||
void ssl_message_queue_sanity()
|
||||
{
|
||||
mbedtls_test_ssl_message_queue queue = {NULL, 0, 0, 0};
|
||||
mbedtls_test_ssl_message_queue queue = SSL_MESSAGE_QUEUE_INIT;
|
||||
|
||||
USE_PSA_INIT();
|
||||
/* Trying to push/pull to an empty queue */
|
||||
@ -481,7 +483,7 @@ exit:
|
||||
/* BEGIN_CASE */
|
||||
void ssl_message_queue_basic()
|
||||
{
|
||||
mbedtls_test_ssl_message_queue queue = {NULL, 0, 0, 0};
|
||||
mbedtls_test_ssl_message_queue queue = SSL_MESSAGE_QUEUE_INIT;
|
||||
|
||||
USE_PSA_INIT();
|
||||
TEST_ASSERT(mbedtls_test_ssl_message_queue_setup(&queue, 3) == 0);
|
||||
@ -510,7 +512,7 @@ exit:
|
||||
/* BEGIN_CASE */
|
||||
void ssl_message_queue_overflow_underflow()
|
||||
{
|
||||
mbedtls_test_ssl_message_queue queue = {NULL, 0, 0, 0};
|
||||
mbedtls_test_ssl_message_queue queue = SSL_MESSAGE_QUEUE_INIT;
|
||||
|
||||
USE_PSA_INIT();
|
||||
TEST_ASSERT(mbedtls_test_ssl_message_queue_setup(&queue, 3) == 0);
|
||||
@ -538,7 +540,7 @@ exit:
|
||||
/* BEGIN_CASE */
|
||||
void ssl_message_queue_interleaved()
|
||||
{
|
||||
mbedtls_test_ssl_message_queue queue = {NULL, 0, 0, 0};
|
||||
mbedtls_test_ssl_message_queue queue = SSL_MESSAGE_QUEUE_INIT;
|
||||
|
||||
USE_PSA_INIT();
|
||||
TEST_ASSERT(mbedtls_test_ssl_message_queue_setup(&queue, 3) == 0);
|
||||
@ -574,7 +576,7 @@ exit:
|
||||
/* BEGIN_CASE */
|
||||
void ssl_message_queue_insufficient_buffer()
|
||||
{
|
||||
mbedtls_test_ssl_message_queue queue = {NULL, 0, 0, 0};
|
||||
mbedtls_test_ssl_message_queue queue = SSL_MESSAGE_QUEUE_INIT;
|
||||
size_t message_len = 10;
|
||||
size_t buffer_len = 5;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user