Add tests to cover xQueueCreateSetStatic (#1323)

Add tests to cover xQueueCreateSetStatic

This API was recently added in the following PR:
https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/1228

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
main
Gaurav-Aggarwal-AWS 3 days ago committed by GitHub
parent 6d364f0b1f
commit 3d927557dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -39,6 +39,7 @@
#include "mock_fake_port.h"
/* ============================ GLOBAL VARIABLES =========================== */
#define EVENT_QUEUE_LENGTH 5
/* ========================== CALLBACK FUNCTIONS =========================== */
@ -124,6 +125,19 @@ void test_xQueueCreateSet_oneLength( void )
vQueueDelete( xQueueSet );
}
void test_xQueueCreateSetStatic_HappyPath( void )
{
StaticQueue_t xQueueSetBuffer;
QueueHandle_t xQueueSetStorage[ EVENT_QUEUE_LENGTH ];
QueueSetHandle_t xQueueSet = NULL;
xQueueSet = xQueueCreateSetStatic( EVENT_QUEUE_LENGTH,
( uint8_t * ) &( xQueueSetStorage[ 0 ] ),
&( xQueueSetBuffer ) );
TEST_ASSERT_NOT_NULL( xQueueSet );
}
/**
* @brief Test xQueueAddToSet with the same queue twice
* @coverage xQueueAddToSet

Loading…
Cancel
Save