Home > User Support > CoverageMaster winAMS FAQ

CoverageMaster winAMS FAQ

Coverage Measurement

102_03: Can C1 coverage be measured for ternary operators (ex. ((x >= y) ? x : y))?

Question:

Can C1 coverage be measured for ternary operators like ((x >= y) ? x : y)?

Answer:

In CoverageMaster, the ternary operator is treated as one executable statement, is not considered as a conditional statement, and is not subject to C1 coverage measurement. Also, IF statements written in one line, for example "if (a == b) {x ++;}" are not subject to C1 coverage measurement.

For additional details on C1 coverage measurement restrictions such as this see the CoverageMaster winAMS Help manual, "Program Restrictions" page, "C1 Coverage Restrictions" section.

Although ternary operators are not subject to C1 coverage measurement, MC/DC coverage measurement can be performed. Please refer to the following reference materials for creating a MC/ DC measurement environment.

Please refer to the one of the following documents for creating a MC/DC measurement environment.

MC/DC Setup Guide (PDF)

CoverageMaster winAMS Tutorial
See "[Application] Measuring Coverage by Hook Code" p. 102

 

Related Technical Tips Search

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

Search key word link: Ternary Operator | C1 Coverage
Technical Tips Google Search


Information Links