Skip to main content

Module testing

Module testing 

Source
Expand description

Headless test harness driving an App with synthetic input. Headless test harness driving an App with synthetic input.

Also home to conformance, the cross-backend harness that tests a raw Backend facet against its own trait contract.

TestHarness owns the drive-until-settled loop that a test would otherwise hand-roll around Headless (retroglyph#612): Headless supplies the backend and Headless::push_event, and the harness supplies everything between that and the assertion. Feature-gated (testing), no effect on release builds. Not a UI-testing framework: no assertions, no matchers, no fixtures, just the loop and the input synthesis that otherwise gets rewritten per consumer. See “Driving an App with TestHarness for the full workflow.

conformance is a different tool for a different job: it drives a backend directly (no App, no Terminal) through the obligations Output, Cursor, and Input each promise but that a lone impl block never states, catching the five backends in this workspace (and any future one) disagreeing on them (retroglyph#763).

Modules§

conformance
Cross-backend conformance tests for Output, Cursor, and Input (retroglyph#763).

Structs§

TestHarness
Drives an App against a Headless backend: queues synthetic input, steps frames, and reads back the rendered view.

Enums§

RunError
Error returned by TestHarness::settle when the queue never drained within the step budget.

Constants§

DEFAULT_MAX_STEPS
Default step budget for TestHarness::run before it treats a non-draining event queue as a stuck app and panics.
STEP_DELTA
Fixed per-frame delta TestHarness::step hands to App::update.