
Test Adequacy Assessment
Z is the location to which the statement at Y jumps. The last statement
in an LCSAJ is a jump and Z may be program exit.
When control arrives at statement X, follows through to statement
Y, and then jumps to statement Z, we say that the LCSAJ (X, Y, Z) is
traversed. Alternate terms for traversed are covered and exercised. The
next three examples illustrate the derivation and traversal of LCSAJs in
different program structures.
Example 6.19: Consider the following program composed of one de-
cision. We are not concerned with the code for function g used in this
program.
Program P6.11
1 begin
2 int x,y,p;
3 input (x, y);
4 if(x<0)
5