(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func TestYieldKeyVal(t *testing.T) { |
| 118 | src := `<? yield $a => $b;` |
| 119 | |
| 120 | expected := &node.Root{ |
| 121 | Position: &position.Position{ |
| 122 | StartLine: 1, |
| 123 | EndLine: 1, |
| 124 | StartPos: 3, |
| 125 | EndPos: 18, |
| 126 | }, |
| 127 | Stmts: []node.Node{ |
| 128 | &stmt.Expression{ |
| 129 | Position: &position.Position{ |
| 130 | StartLine: 1, |
| 131 | EndLine: 1, |
| 132 | StartPos: 3, |
| 133 | EndPos: 18, |
| 134 | }, |
| 135 | Expr: &expr.Yield{ |
| 136 | Position: &position.Position{ |
| 137 | StartLine: 1, |
| 138 | EndLine: 1, |
| 139 | StartPos: 3, |
| 140 | EndPos: 17, |
| 141 | }, |
| 142 | Key: &expr.Variable{ |
| 143 | Position: &position.Position{ |
| 144 | StartLine: 1, |
| 145 | EndLine: 1, |
| 146 | StartPos: 9, |
| 147 | EndPos: 11, |
| 148 | }, |
| 149 | VarName: &node.Identifier{ |
| 150 | Position: &position.Position{ |
| 151 | StartLine: 1, |
| 152 | EndLine: 1, |
| 153 | StartPos: 9, |
| 154 | EndPos: 11, |
| 155 | }, |
| 156 | Value: "a", |
| 157 | }, |
| 158 | }, |
| 159 | Value: &expr.Variable{ |
| 160 | Position: &position.Position{ |
| 161 | StartLine: 1, |
| 162 | EndLine: 1, |
| 163 | StartPos: 15, |
| 164 | EndPos: 17, |
| 165 | }, |
| 166 | VarName: &node.Identifier{ |
| 167 | Position: &position.Position{ |
| 168 | StartLine: 1, |
| 169 | EndLine: 1, |
| 170 | StartPos: 15, |
| 171 | EndPos: 17, |
| 172 | }, |
| 173 | Value: "b", |
| 174 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…