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

Function TestPrint_MemberNode

ast/print_test.go:99–108  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

97}
98
99func TestPrint_MemberNode(t *testing.T) {
100 node := &ast.MemberNode{
101 Node: &ast.IdentifierNode{
102 Value: "a",
103 },
104 Property: &ast.StringNode{Value: "b c"},
105 Optional: true,
106 }
107 require.Equal(t, `a?.["b c"]`, node.String())
108}
109
110func TestPrint_ConstantNode(t *testing.T) {
111 tests := []struct {

Callers

nothing calls this directly

Calls 2

StringMethod · 0.95
EqualFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…