Unit test

Applies to: general

A unit test checks a small piece of code automatically. Good tests lock in expected behavior and catch regressions.

assert square(3) == 9

See also: assertion, function