Add some asserts into the common demo tasks to catch scenarios where the tasks are not being used but the part of the demo/test that gets called from the tick hook is called resultant in an access to objects that were not created.

pull/8/head
Richard Barry 5 years ago
parent 61a003088d
commit ef31243396

@ -976,6 +976,9 @@ BaseType_t xMessagePosted;
/* Called periodically from the tick hook to exercise the "FromISR"
functions. */
/* Check the even group tasks were actually created. */
configASSERT( xISREventGroup );
xCallCount++;
if( xCallCount == xSetBitCount )

@ -609,6 +609,9 @@ const BaseType_t xCallInterval = pdMS_TO_TICKS( 50 );
uint32_t ulPreviousValue;
const uint32_t ulUnexpectedValue = 0xff;
/* Check the task notification demo tasks were actually created. */
configASSERT( xTaskToNotify );
/* The task performs some tests before starting the timer that gives the
notification from this interrupt. If the timer has not been created yet
then the initial tests have not yet completed and the notification should

@ -478,7 +478,8 @@ const TickType_t xPeriod = 75, xCycles = 5, xAllowableMargin = ( bktALLOWABLE_MA
high as to disrupt the timer tests. */
vTaskPrioritySet( NULL, configTIMER_TASK_PRIORITY - 1 );
/* Crude check to too that vTaskDelay() blocks for the expected period. */
/* Crude check to too see that vTaskDelay() blocks for the expected
period. */
xPreTime = xTaskGetTickCount();
vTaskDelay( bktTIME_TO_BLOCK );
xPostTime = xTaskGetTickCount();

Loading…
Cancel
Save