Class ExpectedOutputCompanions
@Test program carries expected-output companion files — the
validation mechanism EK9 accepts INSTEAD of assertions. Call this; do not re-derive the lookup.
Two consumers need the same answer for different reasons and must not drift apart:
EmptyTestDetector asks it to decide whether a test is empty (E81007 fires only when there
are neither assertions NOR expected-output files), and the input-variety reporting asks it to
explain an asserted figure. A test validated purely by expected output records DRIVEN
cells and zero ASSERTED ones, because the variety runtime opens its assert window around an
assert condition and nothing else — so without knowing how a suite validates, a reader
cannot tell thin testing from a blind spot in the instrument.
The source name arrives as a file:// URI (a token's "general identifier"). Stripping the
scheme is load-bearing: Path.of otherwise treats file: as a path segment, the
parent directory is garbage, the sibling files are never found, and a valid assert-free test looks
empty — a false E81007.
-
Method Summary
-
Method Details
-
existFor
Whether expected-output companions sit beside the given source.- Parameters:
sourceFile- the test's source file, as a path or afile://URI; may be null- Returns:
- true when
expected_output.txtor anyexpected_case_*.txtis present
-