Definition
Plain language
A line in a test that says "this should equal that," and fails the test if it doesn't.
As stated in the literature
A check inside a test that compares actual program behavior against an expected value; assertion failures dominate the false rejections produced by model-authored test suites.
Also called: assertions, assertion failure, assertion failures
Why it matters: Assertions are where a wrong expected value does its damage: if the expected number is off, a perfectly good program gets marked as broken.
For example, a test for a function that adds numbers might contain the line "check that add(2, 3) equals 5," and the test fails the moment the function returns anything else.
Heard on the show
“He uses "lying" throughout the paper in a specific, narrow sense: a linear residual-stream signal distinguishing true from false assertions.”Episode 004 — The Sycophancy Circuit That Survives Alignment Training