mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 16:57:41 -04:00
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>
This commit is contained in:
parent
6d364f0b1f
commit
3d927557dc
1 changed files with 14 additions and 0 deletions
|
@ -39,6 +39,7 @@
|
||||||
#include "mock_fake_port.h"
|
#include "mock_fake_port.h"
|
||||||
|
|
||||||
/* ============================ GLOBAL VARIABLES =========================== */
|
/* ============================ GLOBAL VARIABLES =========================== */
|
||||||
|
#define EVENT_QUEUE_LENGTH 5
|
||||||
|
|
||||||
/* ========================== CALLBACK FUNCTIONS =========================== */
|
/* ========================== CALLBACK FUNCTIONS =========================== */
|
||||||
|
|
||||||
|
@ -124,6 +125,19 @@ void test_xQueueCreateSet_oneLength( void )
|
||||||
vQueueDelete( xQueueSet );
|
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
|
* @brief Test xQueueAddToSet with the same queue twice
|
||||||
* @coverage xQueueAddToSet
|
* @coverage xQueueAddToSet
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue