In computer programming, an assertion is a programming language construct that checks whether an expression is true. Assertions are written so that they should always evaluate to true. If an assertion is false, it indicates a possible bug in the program. This is called an "assertion failure."