(t *testing.T)
| 240 | } |
| 241 | |
| 242 | func TestBooleanAnd(t *testing.T) { |
| 243 | src := `<? $a && $b;` |
| 244 | |
| 245 | expected := &node.Root{ |
| 246 | Position: &position.Position{ |
| 247 | StartLine: 1, |
| 248 | EndLine: 1, |
| 249 | StartPos: 3, |
| 250 | EndPos: 12, |
| 251 | }, |
| 252 | Stmts: []node.Node{ |
| 253 | &stmt.Expression{ |
| 254 | Position: &position.Position{ |
| 255 | StartLine: 1, |
| 256 | EndLine: 1, |
| 257 | StartPos: 3, |
| 258 | EndPos: 12, |
| 259 | }, |
| 260 | Expr: &binary.BooleanAnd{ |
| 261 | Position: &position.Position{ |
| 262 | StartLine: 1, |
| 263 | EndLine: 1, |
| 264 | StartPos: 3, |
| 265 | EndPos: 11, |
| 266 | }, |
| 267 | Left: &expr.Variable{ |
| 268 | Position: &position.Position{ |
| 269 | StartLine: 1, |
| 270 | EndLine: 1, |
| 271 | StartPos: 3, |
| 272 | EndPos: 5, |
| 273 | }, |
| 274 | VarName: &node.Identifier{ |
| 275 | Position: &position.Position{ |
| 276 | StartLine: 1, |
| 277 | EndLine: 1, |
| 278 | StartPos: 3, |
| 279 | EndPos: 5, |
| 280 | }, |
| 281 | Value: "a", |
| 282 | }, |
| 283 | }, |
| 284 | Right: &expr.Variable{ |
| 285 | Position: &position.Position{ |
| 286 | StartLine: 1, |
| 287 | EndLine: 1, |
| 288 | StartPos: 9, |
| 289 | EndPos: 11, |
| 290 | }, |
| 291 | VarName: &node.Identifier{ |
| 292 | Position: &position.Position{ |
| 293 | StartLine: 1, |
| 294 | EndLine: 1, |
| 295 | StartPos: 9, |
| 296 | EndPos: 11, |
| 297 | }, |
| 298 | Value: "b", |
| 299 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…