Practice question · True or false
A program that passes one hundred typical-case tests is guaranteed to have no bugs.
Hints
- Ask whether typical cases exercise the boundaries where bugs hide.
- Testing can show bugs are present but cannot show they are absent.
Show the answer
False
Why
False. A hundred typical cases prove nothing about the edge cases — an empty input, a zero, an off-by-one boundary — where most real bugs live. Testing reveals the presence of bugs cheaply, but no finite suite can guarantee their absence.
Practise Testing Small Programs
The app has 5 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on Testing Small Programs
- A function is meant to accept a whole number of items. Sort each test input by its kind.
- Order the steps of writing and running one test case.
- A test suite that passes on typical inputs can miss bugs that a handful of edge cases would catch…
- A test asserts that a function returns something, and passes even when the function returns the wrong answer.…
- A function takes a list of numbers. Select every input that is an edge case worth testing.