Skip to main content

Crate day_mock

Crate day_mock 

Source
Expand description

day-mock — the headless toolkit (DESIGN.md §3.2, §21.2 M0–M1).

Records every toolkit call into a compact op log (golden-diffable), performs deterministic measurement (8pt/char × 16pt line labels, fixed control sizes), and lets tests inject native events through the real sink. The op log is the contract for the fine-grained guarantees: “exactly one op per state change” and “bounded measure calls” are assertions over this log.

Structs§

MockHandle
MockProbe
MockState
MockToolkit
The mock backend. Cloneable observer half: construct with MockToolkit::new and keep the returned MockProbe to inspect state after day-core takes ownership of the toolkit.
MockWidget
MockWindow
A secondary window opened through the open_window duty (docs/windows.md) — probe-visible for the seam tests.

Functions§

text_size
Deterministic text metrics: 8pt per char, 16pt line height, greedy wrap.
Day API ↩ Guides· daybrite.dev