Repairing a defect

Fortunately, increased code coverage did not expose any new defects, but TEST 1 and TEST2 of the SIMPLECONDITION service are still producing a failed result.

To fix the  defect:

  1. In the Project Browser tab on the right-hand side of the screen, right-click the MyAdaTest component testing node and then select View Report>Test

A failure is reported in the component testing report, so the effort to improve coverage has resulted in the discovery of a new defect. The Report Window on the left-hand side of the screen flags this error nicely.

  1. In the Report Window, select one of the Element 1 nodes that has a Failed symbol to its left.

Given X equal to 1 or -1, the SIMPLECONDITION function is supposed to return a RET_SIMPLECONDITION value of -1. However, this did not happen. RET_SIMPLECONDITION has a value of 1, thus creating a defect.

  1. Open CodeCoverage.adb and use the Asset Browser to locate the SimpleCondition function and change the line:

if (x<0) then


if (x>0) then

  1. From the File menu, select Save.

This should fix the problem.