Class IsTestProgram
@Test program?" (and, with its siblings, what execution group it is in) — use
this, do not read the squirrelled key directly.
The encoding contract, in one place because it keeps needing restating
Phase 1 (DefinitionListener) records a @Test directive on the program
aggregate as two deliberately separate squirrelled keys:
CommonValues.TEST_DIRECTIVE— its presence is the authoritative "this is a test". Its value is the sequential execution group (""when ungrouped), whichTestRunnerschedules on.CommonValues.REQUIREMENT_REF— the requirement the test anchors, on its own key. It is NOT packed into the group value, because a group name that happened to look like a requirement id would otherwise silently reschedule the test.CommonValues.TEST_EXIT_CODE— the exit code the test declared with"EXIT:<n>", on its own key for the same reason; absent means 0.
Consolidated 2026-08-04: the presence check was inlined at seven sites across three modules (compiler-main's call-graph collector, the MCP anchor source / anchor tool / neighbourhood extractor, the CLI test runner, and two IDE providers), two of them private methods that had independently arrived at the same name. Nothing tied them together, so the contract above lived only in prose comments that each site restated slightly differently.
No statics (Steve, 2026-10-28; was TestPrograms): each question is a class to hold an instance of -
this one, IsWithinTestProgram, TestExecutionGroupOf, DeclaredTestExitCodeOf and
ExpectedTestExitCodeOf.
-
Constructor Details
-
IsTestProgram
public IsTestProgram()
-
-
Method Details
-
test
Whether this symbol is itself a@Testprogram.This is the direct question, correct for callers already holding a program aggregate — which is most of them, since programs are what
AllProgramsSupplieryields.
-