mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 16:57:41 -04:00
Fix one typical misusage of CMock. (#1112)
* Fix one typical misusage of CMock. CMock has three policies when dealing with pointer: 1. compare_ptr : compare the pointer itself; 2. compare_data : compare the data which is pointed by pointer; 3. smart : compare the pointer itself, or compare the data; By default, CMock use compare_data policy. Most test cases in FreeRTOS need to compare the pointer itself, and we haven't use CMock properly. For example, one test case of vTaskResume is wrong, because current CMock compares the data pointed by pointer, so the error didn't exposed. There are so many misusage need to fix, it will take a lot of work. I'm here to fix one typical misusage first. * Try to fix formatting syntax.
This commit is contained in:
parent
55d07daf0a
commit
ae39f8e245
2 changed files with 3 additions and 2 deletions
|
@ -2626,8 +2626,8 @@ void test_vTaskResume_success_task_event_list_orphan( void )
|
|||
/* back */
|
||||
uxListRemove_ExpectAndReturn( &ptcb->xStateListItem, pdTRUE );
|
||||
/* prvAddTaskToReadyList*/
|
||||
listINSERT_END_Expect( &pxReadyTasksLists[ create_task_priority ],
|
||||
&ptcb->xStateListItem );
|
||||
listINSERT_END_ExpectWithArray( &pxReadyTasksLists[ 3 ], 0,
|
||||
&ptcb->xStateListItem, 0 );
|
||||
/* API Call */
|
||||
vTaskResume( task_handle ); /* not current tcb */
|
||||
/* Validations */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue