mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-02-08 20:53:49 +08:00
Add tests to cover xQueueCreateSetStatic (#1323)
Some checks failed
CI Checks / git-secrets (push) Has been cancelled
CI Checks / formatting (push) Has been cancelled
CI Checks / spell-check (push) Has been cancelled
CI Checks / doxygen (push) Has been cancelled
CI Checks / verify-manifest (push) Has been cancelled
CI Checks / memory-statistics (push) Has been cancelled
CI Checks / proof_ci (push) Has been cancelled
FreeRTOS Demos / WIN32 MSVC (push) Has been cancelled
FreeRTOS Demos / WIN32 MingW (push) Has been cancelled
FreeRTOS Demos / Posix GCC (push) Has been cancelled
FreeRTOS Demos / GNU MSP430 Toolchain (push) Has been cancelled
FreeRTOS Demos / GNU ARM Toolchain (push) Has been cancelled
FreeRTOS MPU Demo / TI-Hercules RM46 and RM57 MPU Demos (push) Has been cancelled
Build FreeRTOS+ Demos / Windows Simulator Cellular Demos (push) Has been cancelled
Build FreeRTOS+ Demos / coreHTTP WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / corePKCS11 WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / core Library Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / AWS IoT Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Posix Simulator Demo (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP QEMU ARM MPS2 AN385 (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+CLI Windows Simulator Demos (push) Has been cancelled
Kernel Unit Tests / FreeRTOS/Source Submodule Revision (push) Has been cancelled
Kernel Unit Tests / FreeRTOS-Kernel Main Branch (push) Has been cancelled
Some checks failed
CI Checks / git-secrets (push) Has been cancelled
CI Checks / formatting (push) Has been cancelled
CI Checks / spell-check (push) Has been cancelled
CI Checks / doxygen (push) Has been cancelled
CI Checks / verify-manifest (push) Has been cancelled
CI Checks / memory-statistics (push) Has been cancelled
CI Checks / proof_ci (push) Has been cancelled
FreeRTOS Demos / WIN32 MSVC (push) Has been cancelled
FreeRTOS Demos / WIN32 MingW (push) Has been cancelled
FreeRTOS Demos / Posix GCC (push) Has been cancelled
FreeRTOS Demos / GNU MSP430 Toolchain (push) Has been cancelled
FreeRTOS Demos / GNU ARM Toolchain (push) Has been cancelled
FreeRTOS MPU Demo / TI-Hercules RM46 and RM57 MPU Demos (push) Has been cancelled
Build FreeRTOS+ Demos / Windows Simulator Cellular Demos (push) Has been cancelled
Build FreeRTOS+ Demos / coreHTTP WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / corePKCS11 WinSim Demos (push) Has been cancelled
Build FreeRTOS+ Demos / core Library Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / AWS IoT Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Posix Simulator Demo (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP QEMU ARM MPS2 AN385 (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+TCP Windows Simulator Demos (push) Has been cancelled
Build FreeRTOS+ Demos / FreeRTOS+CLI Windows Simulator Demos (push) Has been cancelled
Kernel Unit Tests / FreeRTOS/Source Submodule Revision (push) Has been cancelled
Kernel Unit Tests / FreeRTOS-Kernel Main Branch (push) Has been cancelled
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:
committed by
GitHub
parent
6d364f0b1f
commit
3d927557dc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user