Apply what you understand
A small bug report with reproducible evidence
A working program is the beginning. Explain your decisions and show evidence that they hold up.
The challenge
Turn the threshold defect into a concise bug report and repair. Include independent expected results, a regression test, and a clearly stated limit.
Evidence to include
- State a requirement and derive expectations before running.
- Show the smallest input that reveals the original mismatch.
- Demonstrate that the test fails for the defect and passes after the repair.
- Record the assertion policy and compiler command.
- Explain one untested requirement and propose the next relevant case.
Starter code
pragma Assertion_Policy (Check);
with Ada.Text_IO;
procedure Main is
function Passed (Score : Integer) return Boolean is
begin
return Score >= 70;
end Passed;
begin
pragma Assert (not Passed (69));
pragma Assert (Passed (70));
pragma Assert (Passed (71));
Ada.Text_IO.Put_Line ("Threshold checks passed");
end Main;Save your practice
Sign in to save a project submission.