expected value

The answer a test claims the code should produce, written into the test before comparing it with the real result.

In more detail

Work it out by hand and write it as a literal number or string. Never compute it by calling the code under test, because a test that agrees with the implementation by construction can never disagree with a bug.

Related terms

Taught in

References