Turn!
real function exponent(real a, int b); | |
// compute ab | |
real result; | |
result := 1.0; | |
if b < 0 then | |
b := -b; | |
a := 1.0/a; | |
end if; | |
while b > 0 loop | |
b := b-1; | |
result := result*a; | |
end loop; | |
return result |
a) Show what steps must be taken to find test cases for coverage
testing, using this program as an example. Show the distinction
between node-coverage and branch-coverage.
....(5 points, 2 pages)
b) Explain why coverage testing is unlikely to reveal the error
(no need to distinguish beteen node- and branch-coverage here).
....(1 point, 2 lines)
c) Explain briefly the concept of boundary value testing,
and show that it would probably reveal the error.
....(3 points, 1 page)
d) Explain why inspection would probably reveal the error.
....(1 point, 2 lines)
Apart from the people involved in the project, 2-3 others attend all weekly meetings.What advantages can be expected from this policy? ....(3 points, 1 page)