Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsTesting · rule

test.assertion_failed

On this page

A test's assert doesn't hold: its condition is false, or a call checked with assert … fails returned or failed differently.

Area 13, Testing; not declinable; the next step is usually the agent's.

Why Jadpo refuses it

An assert is the test saying what the code should do. When it doesn't hold, the test and the code disagree, and only one of them is right. The report shows each side of the comparison, records field by field with a diff of what differs, so you can tell which without running the test again.

What it looks like

todos.test.jadpo, testing draft in todos.jadpo, which makes a todo with priority 3:

example
test "a new draft has normal priority" {    var fresh: TodoDraft = draft("Buy milk")    assert fresh == TodoDraft {        title: "Buy milk"        priority: 2    }}
text
FAIL  a new draft has normal priority --> todos.test.jadpo:3  assert fresh == TodoDraft { ...         |        |         |        TodoDraft { title: "Buy milk", priority: 2 }         TodoDraft { title: "Buy milk", priority: 3 }  expected: TodoDraft { title: "Buy milk", priority: 2 }  actual: TodoDraft { title: "Buy milk", priority: 3 }  diff: ~ priority: expected 2, actual 3  rule: test.assertion_failed  rerun: jadpo test todos.test.jadpo:3 --seed 1test failed: 1 failed, 1 pure test

A failed test's report has no next: line, and the rule is your agent's to act on. (agent) at the end of the next: line means your coding agent can make the fix itself. The rerun: line runs this one test again with the same seed.

How to fix it

The question is which is right, the test or the code.

If the code is right, change what the test expects. In todos.test.jadpo:

example
        priority: 3

The test now expects the priority draft gives, and passes.

If the test is right, change the code. In todos.jadpo:

example
        priority: 2

Every new draft now has priority 2, and the test passes.

Markdown for agents: /docs/errors/test.assertion_failed.md.Built from Jadpo main at aee2e8f.