"Size unknown" is the line a stream fixing D5 reported as untestable. It is two
assertTextEquals calls, and it needed two rather than one: the size line renders
independently of the probe, so it is asserted with a probe and without one. That
independence is the contract, and a test of the probed case alone would leave the
branch a user hits first -- the card is on screen before the probe finishes --
unguarded.
The rest of the card degrades in words the same way, and none of it was covered:
the four InputKind branches, "No video track", "No audio track", describeVideo's
"Unknown", and the two `> 0` guards that drop the dimension and length rows
rather than printing 0 and 0:00. Each guard gets a case on both sides, because
the present side alone stays green when the guard is deleted -- what deleting it
produces is "Size: 0x0" and "Length: 0:00", the same invented-measurement defect
as "0 B".
The four pure helpers go in a plain JVM class beside it, with formatBytes pinned
at each threshold and one byte below it. A `>=` quietly becoming a `>` is only
visible from a value sitting exactly on the boundary.
Two things the issue could not have known:
- Its second acceptance criterion, "delete the return@Column and watch the
Reading... test go red", cannot happen -- it does not compile. The early return
is what smart-casts `probe` non-null, so ten uses below it fail with "Only safe
(?.) or non-null asserted (!!.) calls are allowed on a nullable receiver". The
exit is enforced by the compiler, not by a test. Both compilable regressions
someone would land instead are covered and were run red.
- CodecNames.describeAudio has no UNPARSEABLE arm, unlike describeVideo, so it
answers the raw sentinel rather than "Unrecognised". Unreachable today, because
the UNPARSEABLE kind renders the explanatory line instead of rows. Left alone;
recorded on the PR for R38.5.
The divider's absence is not asserted and cannot be: Material 3 renders it as a
Box with no semantics modifier, so it contributes no node. What is asserted is
everything it precedes, plus the card's child count. The class KDoc says so.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>