Skip to content

Commit

Permalink
Remove the configASSERT unit test for prvCheckForRunStateChange (Free…
Browse files Browse the repository at this point in the history
  • Loading branch information
chinglee-iot committed Jun 19, 2024
1 parent bf046c1 commit b2b177a
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions FreeRTOS/Test/CMock/smp/config_assert/config_assert_utest.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,40 +622,6 @@ void test_vTaskStepTick_assert_scheduler_not_suspended( void )
validate_and_clear_assertions();
}

/**
* @brief prvCheckForRunStateChange - task state not changed.
*
* When the task is able to run after calling portENABLE_INTERRUPTS. The task state
* is supposed to be changed to run state. This test cover the assertion of this scenario.
*
* <b>Coverage</b>
* @code{c}
* configASSERT( pxThisTCB->xTaskRunState != taskTASK_YIELDING );
* @endcode
*/
void test_prvCheckForRunStateChange_assert_task_state_not_changed( void )
{
TCB_t xTaskTCB = { NULL };

pxCurrentTCBs[ 0 ] = &xTaskTCB;
xTaskTCB.uxCriticalNesting = 0;
xTaskTCB.xTaskRunState = taskTASK_YIELDING;
uxSchedulerSuspended = 1;

/* Expection. */
vFakePortAssertIfISR_Expect();
vFakePortGetCoreID_ExpectAndReturn( 0 );
vFakePortGetCoreID_ExpectAndReturn( 0 );
vFakePortReleaseTaskLock_Expect();
vFakePortEnableInterrupts_Expect();

/* API Call. */
EXPECT_ASSERT_BREAK( prvCheckForRunStateChange() );

/* Test Verifications */
validate_and_clear_assertions();
}

/**
* @brief vTaskStepTick - assert if scheduler suspended.
*
Expand Down

0 comments on commit b2b177a

Please sign in to comment.