Mathematics I / Programming for Mathematics
Practice question · Multiple choice

A test suite passes and the program is wrong. Which of these does testing structurally fail to catch?

Hints
  1. Ask what a test suite is a sample of.
  2. The other three options describe things a test would catch. Which one leaves no trace?
Show the answer

D. A missing case nobody thought to test

Why

Tests are a finite sample of intended behaviour, so a case you never considered produces no failing test, there is nothing to fail. That is Dijkstra's point about presence and absence of bugs, and why coverage metrics mislead: they measure lines executed, never the requirement you forgot.

Read the lesson: Programming for Mathematics →

Practise Programming for Mathematics

The app has 6 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.

More questions on Programming for Mathematics