Home > User Support > CoverageMaster winAMS FAQ

CoverageMaster winAMS FAQ

CoverageMaster linked with CasePlayer2

E01_01: When using CoverageMaster linked with CasePlayer2, should I add all of the source files needed for compilation to the CasePlayer2 project?

Question:

I am using CoverageMaster linked with CasePlayer2 in order to use the variable auto detection, test data generation and C1 (MC/DC) coverage measurement features. The functions I want to test only consist of a portion of the source files contained in the entire compiled object file. Do I need do add all of the source files needed for compilation to the CasePlayer2 project for analysis?

Answer:

It is not necessary to add all of the source files used to compile the object file to CasePlayer2. To use CasePlayer2 linked features, only the source files containing the functions to be tested need to be analyzed using CasePlayer2's advanced analysis mode.

Using the following source files as an example, in order to test "func2" only "file2.c" must be analyzed with CasePlayer2.

Example:
/* file1.h */
char *gb_port1;    // I/O Port
int  *gb_data_out; // Result

/* file1.c */
#include "file1.h"

void func1( int enable, int mode, int input )
{
}

/* file2.c */
extern char *gb_port1;    // I/O Port
extern int  *gb_data_out; // Result

void func2( int mode, int *data_in )
{
  if( *gb_port1 & 0x00000001 ) {
    *gb_data_out = mode;
  } else {
    *gb_data_out = *data_in;
  }
}

 


Related Technical Tips Search

Other technical tips in GAIO's web site can be searched for using the links below.

Search key word link: Source Code Registration
Technical Tips Google Search


Information Links