CoverageStartRecordingData
CoverageIsRecordingData
CoverageStopRecordingData example

#include <windows.h>

#include <stdio.h>

#include "pure.h"

 

void main()

{

   int x;

   CoverageStopRecordingData();

 

   //The preceding line causes Purify to stop recording
   //coverage data.

 

   printf("'0' indicates Purify has stopped recording all \

          coverage data: %d\n", x=CoverageIsRecordingData());

 

   //The preceding line causes a "0" to be printed, verifying
   //that Purify has changed the recording state and,
   //in this case, is no longer recording data.

 

   InputFunctionA();

   printf("'1' indicates Purify is again recording all coverage \

   data: %d\n", x=CoverageStartRecordingData());

 

   //The preceding line starts the recording of coverage data
   //and also prints out the value the function returns, as
   //verification that the recording state has changed.

 

   ComputationFunctionB();

   ComputationFunctionC();

   OutputFunctionD();

}

(C) Copyright IBM Corporation 1992, 2010.