mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-16 01:37:45 -04:00
Update unit tests to match changes in queue.c (#614)
This commit is contained in:
parent
ea798d0612
commit
f37753da06
10 changed files with 57 additions and 535 deletions
|
@ -113,19 +113,11 @@ void test_macro_xQueueCreate_zeroQueueLength_zeroItemSize()
|
|||
QueueHandle_t xQueue = xQueueCreate( 0, 0 );
|
||||
|
||||
/* validate returned queue handle */
|
||||
TEST_ASSERT_NOT_EQUAL( NULL, xQueue );
|
||||
TEST_ASSERT_EQUAL( NULL, xQueue );
|
||||
|
||||
/* verify that configASSERT was called */
|
||||
TEST_ASSERT_EQUAL( true, fakeAssertGetFlagAndClear() );
|
||||
TEST_ASSERT_EQUAL( QUEUE_T_SIZE, getLastMallocSize() );
|
||||
|
||||
/* Veify that queue is empty */
|
||||
TEST_ASSERT_EQUAL( 0, uxQueueMessagesWaiting( xQueue ) );
|
||||
|
||||
/* Veify that queue is also full */
|
||||
TEST_ASSERT_EQUAL( 0, uxQueueSpacesAvailable( xQueue ) );
|
||||
|
||||
vQueueDelete( xQueue );
|
||||
TEST_ASSERT_EQUAL( 0, getNumberMallocCalls() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -141,19 +133,11 @@ void test_macro_xQueueCreate_zeroQueueLength_oneItemSize( void )
|
|||
QueueHandle_t xQueue = xQueueCreate( 0, 1 );
|
||||
|
||||
/* validate returned queue handle */
|
||||
TEST_ASSERT_NOT_EQUAL( NULL, xQueue );
|
||||
TEST_ASSERT_EQUAL( NULL, xQueue );
|
||||
|
||||
/* verify that configASSERT was called */
|
||||
TEST_ASSERT_EQUAL( true, fakeAssertGetFlagAndClear() );
|
||||
TEST_ASSERT_EQUAL( QUEUE_T_SIZE, getLastMallocSize() );
|
||||
|
||||
/* Veify that new queue is empty */
|
||||
TEST_ASSERT_EQUAL( 0, uxQueueMessagesWaiting( xQueue ) );
|
||||
|
||||
/* Valdiate that the queue is full */
|
||||
TEST_ASSERT_EQUAL( 0, uxQueueSpacesAvailable( xQueue ) );
|
||||
|
||||
vQueueDelete( xQueue );
|
||||
TEST_ASSERT_EQUAL( 0, getNumberMallocCalls() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue