Fix Unit test for APIs ulTaskNotifyTake and xTaskNotifyWait (#1102)

This commit is contained in:
Rahul Kar 2023-10-17 09:54:06 +05:30 committed by GitHub
parent 56b878b13b
commit 03926888d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4538,6 +4538,7 @@ void test_ulTaskGenericNotifyTake_success_yield( void )
uxListRemove_ExpectAndReturn( &ptcb->xStateListItem, 1 ); uxListRemove_ExpectAndReturn( &ptcb->xStateListItem, 1 );
listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem, xTickCount + 9 ); listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem, xTickCount + 9 );
vListInsert_Expect( pxDelayedTaskList, &ptcb->xStateListItem ); vListInsert_Expect( pxDelayedTaskList, &ptcb->xStateListItem );
listLIST_IS_EMPTY_ExpectAnyArgsAndReturn( pdTRUE );
/* API Call */ /* API Call */
ret_gen_notify_take = ulTaskGenericNotifyTake( uxIndexToWait, ret_gen_notify_take = ulTaskGenericNotifyTake( uxIndexToWait,
pdFALSE, pdFALSE,
@ -5160,6 +5161,7 @@ void test_xTaskGenericNotifyWait_success_notif_not_received( void )
listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem, listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem,
xTickCount + xTicksToWait ); xTickCount + xTicksToWait );
vListInsert_Expect( pxOverflowDelayedTaskList, &ptcb->xStateListItem ); vListInsert_Expect( pxOverflowDelayedTaskList, &ptcb->xStateListItem );
listLIST_IS_EMPTY_ExpectAnyArgsAndReturn( pdTRUE );
/* API Call */ /* API Call */
ret = xTaskGenericNotifyWait( uxIndexToWait, ret = xTaskGenericNotifyWait( uxIndexToWait,
@ -5249,6 +5251,7 @@ void test_xTaskGenericNotifyWait_success_notif_received_while_waiting( void )
listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem, listSET_LIST_ITEM_VALUE_Expect( &ptcb->xStateListItem,
xTickCount + xTicksToWait ); xTickCount + xTicksToWait );
vListInsert_Expect( pxOverflowDelayedTaskList, &ptcb->xStateListItem ); vListInsert_Expect( pxOverflowDelayedTaskList, &ptcb->xStateListItem );
listLIST_IS_EMPTY_ExpectAnyArgsAndReturn( pdTRUE );
py_operation = &notif_received; py_operation = &notif_received;
/* API Call */ /* API Call */