From 8991fbcb5203dc368f0fb2794bc964733637b808 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 27 Nov 2026 23:37:49 +0100 Subject: [PATCH] resolve tests: id_of covers every arm; goldens directory --- crates/thing-core/tests/goldens/README.md | 6 ++++++ crates/thing-core/tests/resolve.rs | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 crates/thing-core/tests/goldens/README.md diff --git a/crates/thing-core/tests/goldens/README.md b/crates/thing-core/tests/goldens/README.md new file mode 100644 index 0000000..af12c1d --- /dev/null +++ b/crates/thing-core/tests/goldens/README.md @@ -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. diff --git a/crates/thing-core/tests/resolve.rs b/crates/thing-core/tests/resolve.rs index e74fd74..6980979 100644 --- a/crates/thing-core/tests/resolve.rs +++ b/crates/thing-core/tests/resolve.rs @@ -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(_) => "", - _ => "", } }