MCPcopy Index your code
hub / github.com/expr-lang/expr / TestWalk

Function TestWalk

ast/visitor_test.go:21–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

19}
20
21func TestWalk(t *testing.T) {
22 var node ast.Node
23 node = &ast.BinaryNode{
24 Operator: "+",
25 Left: &ast.IdentifierNode{Value: "foo"},
26 Right: &ast.IdentifierNode{Value: "bar"},
27 }
28
29 visitor := &visitor{}
30 ast.Walk(&node, visitor)
31 assert.Equal(t, []string{"foo", "bar"}, visitor.identifiers)
32}
33
34type patcher struct{}
35

Callers

nothing calls this directly

Calls 2

WalkFunction · 0.92
EqualFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…