Add uxQueueGetQueueLength API in queue unit tests (#1074)

* Add uxQueueGetQueueLength API in queue unit tests
for code coverage

* Update Submodule pointer for Kernel V10.6.1

Signed-off-by: kar-rahul-aws <karahulx@amazon.com>
pull/1075/head
kar-rahul-aws 1 year ago committed by GitHub
parent 0948c5eab6
commit 80db00d98b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit ae3a498e435cecdb25b889f2740ea99027dd0cb1
Subproject commit cdd3678c29b5064db24d34042acc974c57a0babb

@ -154,6 +154,9 @@ void test_macro_xQueueCreate_oneItem_zeroLength( void )
TEST_ASSERT_EQUAL( QUEUE_T_SIZE, getLastMallocSize() );
/* Verify that Queue Length is one */
TEST_ASSERT_EQUAL( 1, uxQueueGetQueueLength( xQueue ) );
/* Verify that Queue ItemSize is zero */
TEST_ASSERT_EQUAL( 0, uxQueueGetQueueItemSize( xQueue ) );
@ -180,6 +183,9 @@ void test_macro_xQueueCreate_oneItem_oneLength( void )
TEST_ASSERT_EQUAL( QUEUE_T_SIZE + 1, getLastMallocSize() );
/* Verify that Queue Length is one */
TEST_ASSERT_EQUAL( 1, uxQueueGetQueueLength( xQueue ) );
/* Verify that Queue ItemSize is one */
TEST_ASSERT_EQUAL( 1, uxQueueGetQueueItemSize( xQueue ) );
@ -228,6 +234,9 @@ void test_macro_xQueueCreate_oneItem_multiLength( void )
TEST_ASSERT_EQUAL( QUEUE_T_SIZE + i, getLastMallocSize() );
/* Verify that Queue Length is one */
TEST_ASSERT_EQUAL( 1, uxQueueGetQueueLength( xQueue ) );
/* Verify that Queue ItemSize is equal to the mailbox size */
TEST_ASSERT_EQUAL( i, uxQueueGetQueueItemSize( xQueue ) );

@ -138,6 +138,9 @@ void test_macro_xQueueCreateStatic_nullQueueStorage_oneItem_zeroLength( void )
/* validate returned queue handle */
TEST_ASSERT_NOT_EQUAL( NULL, xQueue );
/* Verify that Queue Length is one */
TEST_ASSERT_EQUAL( 1, uxQueueGetQueueLength( xQueue ) );
/* Verify that Queue ItemSize is zero */
TEST_ASSERT_EQUAL( 0, uxQueueGetQueueItemSize( xQueue ) );
@ -208,6 +211,9 @@ void test_macro_xQueueCreateStatic_large( void )
StaticQueue_t queueBuffer;
QueueHandle_t xQueue = xQueueCreateStatic( MAX_QUEUE_ITEMS, sizeof( uint32_t ), ( void * ) queueStorage, &queueBuffer );
/* Verify that Queue Length is equal to the MAX_QUEUE_ITEMS */
TEST_ASSERT_EQUAL( MAX_QUEUE_ITEMS, uxQueueGetQueueLength( xQueue ) );
/* Verify that Queue ItemSize is 4 */
TEST_ASSERT_EQUAL( 4, uxQueueGetQueueItemSize( xQueue ) );

@ -4,7 +4,7 @@ description: "This is the standard distribution of FreeRTOS."
dependencies:
- name: "FreeRTOS-Kernel"
version: "ae3a498e4"
version: "cdd3678c2"
repository:
type: "git"
url: "https://github.com/FreeRTOS/FreeRTOS-Kernel.git"

Loading…
Cancel
Save