(t *testing.T)
| 97 | } |
| 98 | |
| 99 | func 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 | |
| 110 | func TestPrint_ConstantNode(t *testing.T) { |
| 111 | tests := []struct { |