(t *testing.T)
| 315 | } |
| 316 | |
| 317 | func TestBooleanOr(t *testing.T) { |
| 318 | src := `<? $a || $b;` |
| 319 | |
| 320 | expected := &node.Root{ |
| 321 | Position: &position.Position{ |
| 322 | StartLine: 1, |
| 323 | EndLine: 1, |
| 324 | StartPos: 3, |
| 325 | EndPos: 12, |
| 326 | }, |
| 327 | Stmts: []node.Node{ |
| 328 | &stmt.Expression{ |
| 329 | Position: &position.Position{ |
| 330 | StartLine: 1, |
| 331 | EndLine: 1, |
| 332 | StartPos: 3, |
| 333 | EndPos: 12, |
| 334 | }, |
| 335 | Expr: &binary.BooleanOr{ |
| 336 | Position: &position.Position{ |
| 337 | StartLine: 1, |
| 338 | EndLine: 1, |
| 339 | StartPos: 3, |
| 340 | EndPos: 11, |
| 341 | }, |
| 342 | Left: &expr.Variable{ |
| 343 | Position: &position.Position{ |
| 344 | StartLine: 1, |
| 345 | EndLine: 1, |
| 346 | StartPos: 3, |
| 347 | EndPos: 5, |
| 348 | }, |
| 349 | VarName: &node.Identifier{ |
| 350 | Position: &position.Position{ |
| 351 | StartLine: 1, |
| 352 | EndLine: 1, |
| 353 | StartPos: 3, |
| 354 | EndPos: 5, |
| 355 | }, |
| 356 | Value: "a", |
| 357 | }, |
| 358 | }, |
| 359 | Right: &expr.Variable{ |
| 360 | Position: &position.Position{ |
| 361 | StartLine: 1, |
| 362 | EndLine: 1, |
| 363 | StartPos: 9, |
| 364 | EndPos: 11, |
| 365 | }, |
| 366 | VarName: &node.Identifier{ |
| 367 | Position: &position.Position{ |
| 368 | StartLine: 1, |
| 369 | EndLine: 1, |
| 370 | StartPos: 9, |
| 371 | EndPos: 11, |
| 372 | }, |
| 373 | Value: "b", |
| 374 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…