You need to fix the test so that it is checking for the correct distance.
-
Switch back to the
Team Developer perspective.
-
With
DistanceTest.cbl displayed in the editor, replace the value
4787 with
7703, so that the IF statement now reads:
if function numval(distance-km) not equal 7703
string "Incorrect distance in kilometers returned - "
distance-km delimited by size
x"0" delimited by size
into errormessage
end-string
call MFU-ASSERT-FAIL-Z using errormessage
end-if
-
Press
Ctrl+S to save the changes.
-
In the
Micro Focus Unit Testing view, click
(Run Failed).
The failed test is rerun, and now passes.
-
Select the
Code Coverage tab, and expand
again. Notice how the statistics have changed since we enhanced the test, especially the coverage for
distance-between-airports, which was 0% when we last checked.
This concludes the tutorial.