thing-testkit: fixtures README (thing2 cut 2)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0841c0dd8b
commit
644f122aab
1 changed files with 22 additions and 0 deletions
22
crates/thing-testkit/fixtures/README.md
Normal file
22
crates/thing-testkit/fixtures/README.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# thing-testkit fixtures
|
||||
|
||||
Each `.cc` is a CultCache single-file store of contract documents, written under the pinned
|
||||
clock `2026-01-01T00:00:00Z`. The builders are `thing_testkit::fixture`; the bytes below are
|
||||
frozen, and a normal test run only compares and reads them. The rows are the fixture table of
|
||||
`docs/thing2-build-spec.md` section 2.5; map rules are those of the build spec.
|
||||
|
||||
| File | Holds | Map rules |
|
||||
|---|---|---|
|
||||
| `f01-swarm-dashboard.surface.cc` | One surface: a Grid Box root, a Text bound with a Number Format, a Repeat over a RecordsSource prefix whose template binds Item members, and a Button whose CommandRef is declared | 6, 9 |
|
||||
| `f09-composition-stack.surface.cc` | One surface whose Use passes one argument of each ArgValue arm and a Slot holding a second Use (two levels), and the publisher CompositionDocument both name | 5 |
|
||||
| `f10-hostile.surface.cc` | Four surfaces, one hostile shape each: an undeclared CommandRef, a duplicate id after expansion, an unresolved Use, and a Bind whose schema no fixture provides; plus the one composition (`dup`) the duplicate-id surface expands | 4, 5, 6 |
|
||||
|
||||
A surface whose bytes the contract refuses (an unknown union arm) cannot live in a store: that
|
||||
case is `crates/thing-contract/tests/goldens/node-unknown-arm.bin`, read in place and fed to
|
||||
`MemState::put_raw`.
|
||||
|
||||
## Regenerate
|
||||
|
||||
`THING_BLESS=1 cargo test -p thing-testkit --test fixtures every_fixture_round_trips` rewrites
|
||||
the files through `golden::check`, the one bless door; review the diff before committing. Run
|
||||
the tests without `THING_BLESS` to compare.
|
||||
Loading…
Reference in a new issue