Glossary · Term

assertion

← all terms

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

“Because a suite is a list of assertions: for this input, the output should be that.”
Episode 233 — Why a Model Can Grade an Answer But Not Write the Answer Key

Mentioned in 5 episodes

  1. 233
    Why a Model Can Grade an Answer But Not Write the Answer Key
  2. 125
    AI Coding Agents Run a Marathon, and Fewer Than One in Three Finish
  3. 054
    When Models Learn the Monitor Exists, the Reasoning Trace Stops Being a Window
  4. 014
    Why a Constrained Pipeline Beat a Full Coding Agent at Finding Bugs 30-to-1
  5. 004
    The Sycophancy Circuit That Survives Alignment Training

Related terms