Reproduce a Bug with One Input
Scenario
The program sometimes accepts bookings for full rooms.
Try it yourself
Choose the smallest report another learner can verify.
| Case | Result |
|---|---|
| Booking is broken | Select a choice above to see what happens. |
| Call canBook(0) | Select a choice above to see what happens. |
Reveal the explanation
- Booking is broken
The other learner cannot reproduce a specific failure.
- Call canBook(0)
Expected false. Actual true. This is enough to reproduce the failure.
Run the same input again. If the result depends on state, include the state in the reproduction.
Your turn
Write a one-case reproduction another learner could run from a terminal.
Common mistake Reporting only that the program is broken.
Check your work
The report includes the command or call, its input, the expected result, and the actual result.
This browser could not save your progress. Changes last until you leave the page.