Assert prove, stepInto and columnItems panic on an unhandled node, and a bare table read is refused as a row

This commit is contained in:
2026-09-29 09:36:14 +02:00
committed by Lillem4n
parent 64bb5c7004
commit d01c914e7f
2 changed files with 13 additions and 0 deletions
+3
View File
@@ -61,10 +61,13 @@ func (*unhandledNode) isNode() {}
func TestNodeSwitchesPanicOnAnUnhandledNode(t *testing.T) {
for name, call := range map[string]func(){
"columnItems": func() { columnItems(&unhandledNode{}) },
"contained": func() { contained(&unhandledNode{}) },
"paths": func() { paths(&unhandledNode{}) },
"prove": func() { (&valueProof{}).prove(&unhandledNode{}) },
"render": func() { render(nil, &unhandledNode{}, renderScope{}) },
"renderEdges": func() { renderEdges(&unhandledNode{}) },
"stepInto": func() { _, _ = stepInto(&unhandledNode{}, "x") },
} {
mustPanic(t, name, call)
}