Skip to main content

Module fixtures

Module fixtures 

Source
Expand description

Test builders shared across the module’s suites.

Only what is genuinely identical everywhere lives here — typed ids, the commit constructor, the visible projection. Per-suite fixtures that encode a test’s intent (which rect, which init values) stay with their tests, where the values can be read next to the assertions they feed.

Modules§

scale
An N×N scale-test scene: a sheet wrapping a square grid of identical Add blocks, fully wired, with no pin left dangling.

Macros§

id_fixtures 🔒

Functions§

area_id
The id numbered n — the door around the Allocator a fixture needs to name an entity before it builds one.
block_id
The id numbered n — the door around the Allocator a fixture needs to name an entity before it builds one.
commit
image_id
The id numbered n — the door around the Allocator a fixture needs to name an entity before it builds one.
pin_id
The id numbered n — the door around the Allocator a fixture needs to name an entity before it builds one.
projection
The user-visible projection: the blocks and their values, without revs or write orders. What an undo must restore, and no more.
rev
A commit’s identity, for a suite that keeps its own history beside a repo’s. Real ones are assigned by Repo::submit; naming a rev no repo assigned is exactly what a history step’s check refuses, so this is also how that refusal is tested.
route_id
The id numbered n — the door around the Allocator a fixture needs to name an entity before it builds one.
route_label_id
The id numbered n — the door around the Allocator a fixture needs to name an entity before it builds one.
text_id
The id numbered n — the door around the Allocator a fixture needs to name an entity before it builds one.