Skip to content

ask tested by

Alexander Liberov edited this page Oct 21, 2026 · 2 revisions

ask: tested-by

Which tests reach this code. One of the diagram questions of the ask verb -- see Diagrams and Charts for the model, the bundle and click-to-source.

Asking it

Answered in-process by the engine (drag-lint ask); no PowerShell is needed (see Charts and the IDE).

From RAD Studio: drag-lint > Reports > Which tests reach this code... -- put the caret on the selection first (see IDE Menu Reference).

drag-lint ask --question tested-by --at <file.pas>:<line>:<col> --db <project.sqlite>

The selection is the symbol under --at (resolved exactly as Type at Cursor resolves a caret). From a terminal, ask it by name:

drag-lint ask tested-by --target MyApp.Orders.TOrderService.Post --db <project.sqlite>

You select

Any symbol.

The chart shows

The DUnitX [Test] methods (and their fixtures) whose call trees reach the selection.

It stands on

COMPUTED at render time, not stored: a bounded caller walk that unions resolved callers and name-matched callers at every hop, stopping at routines carrying a [Test] attribute. symbol_facts.covered_by is reserved and never written, on purpose -- a reverse edge written at index time would depend on file order.

Parameters

Row cap (default 20).

Read it carefully

Ask it against the TEST project's index. A production project's compile closure cannot contain its tests; a test project's closure contains both the tests and the code under test, so the walk runs inside one database.

Clone this wiki locally