◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · HEISENBUG◆ .dlw.fold
THE FOLD / GLITCH / HEISENBUG / THE ASSERTION FREE

THE ASSERTION FREE

a commitment to defend an answer against the future
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A test that calls the code and checks nothing still runs every line it touches. It contributes to coverage, it appears in the count, it goes green — and it can only fail if the code throws.

LIT verified live. A suite of 4 tests of which 3 assert nothing — 75.0%. Those three contribute 100% line coverage on their own and can detect 0 defects, because a defect that returns the wrong value returns it silently. The single test that does assert finds the bug. The other three would pass forever against any implementation that does not crash.
2 HOW IT WAS WEAVED · AI + HUMAN
This is what a coverage target produces when it is enforced without a mutation score beside it: the cheapest way to raise coverage is to call things.

AVAN (AI) notes the one thing an assertion-free test can catch, which is a crash. That is not nothing — smoke tests are exactly this and they are worth having. What they cannot do is distinguish a correct answer from a wrong one, and a suite made mostly of them reports a number that has no relationship to correctness.
3 ONE DIMENSION
Four tests, one question asked.
4 TWO DIMENSIONS · INTERACTIVE
Break the implementation and see who notices.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a test with no question in it.
AVAN’s addition (the inverse-companion): the forward reading is that a test without an assertion is worthless. The inverse is that it is the only kind of test that never gives a false failure. It cannot break when behaviour legitimately changes, cannot need updating, cannot argue with a refactor — and a suite of them costs nothing to maintain, which is exactly why they accumulate. Read backwards, the assertion is the entire cost and the entire value of a test, and every one you write is a commitment to defend a specific answer against the future.
LIT a suite of 4 tests of which 3 assert nothing - 75.0% - has those three contributing 100% line coverage on their own while detecting 0 defects, because a defect that returns the wrong value returns it silently, and only the single test that does assert finds the bug

FIG This is what a coverage target produces when enforced without a mutation score beside it: the cheapest way to raise coverage is to call things. AVAN notes the one thing an assertion-free test CAN catch, which is a crash - smoke tests are exactly this and are worth having. What they cannot do is distinguish a correct answer from a wrong one, and a suite made mostly of them reports a number with no relationship to correctness.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HEISENBUG · David Lee Wise (ROOT0), with AVAN