resolve tests: id_of covers every arm; goldens directory

This commit is contained in:
Meta Vens 2026-11-27 23:37:49 +01:00
commit 8991fbcb52
2 changed files with 14 additions and 1 deletions

View file

@ -0,0 +1,6 @@
# thing-core goldens
`resolve-*.bin` is a CultCache single-file store holding one resolved surface document under the
pinned clock; `resolve-*.txt` is the `{:#?}` text of the same document. The binary is the oracle and
the text is compared beside it. `THING_BLESS=1` through `thing_testkit::golden::check_with_text` is
the only way either changes.

View file

@ -135,11 +135,18 @@ fn id_of(node: &Node) -> &str {
match node {
Node::Box(n) => n.common.id.as_str(),
Node::Text(n) => n.common.id.as_str(),
Node::Image(n) => n.common.id.as_str(),
Node::Button(n) => n.common.id.as_str(),
Node::Toggle(n) => n.common.id.as_str(),
Node::Slider(n) => n.common.id.as_str(),
Node::TextInput(n) => n.common.id.as_str(),
Node::Select(n) => n.common.id.as_str(),
Node::Repeat(n) => n.common.id.as_str(),
Node::Overlay(n) => n.common.id.as_str(),
Node::Plot(n) => n.common.id.as_str(),
Node::Embed(n) => n.common.id.as_str(),
Node::Use(n) => n.common.id.as_str(),
Node::Slot(_) => "<slot>",
_ => "<other>",
}
}