(t *testing.T)
| 985 | } |
| 986 | |
| 987 | func TestLogicalOr(t *testing.T) { |
| 988 | src := `<? $a or $b;` |
| 989 | |
| 990 | expected := &node.Root{ |
| 991 | Position: &position.Position{ |
| 992 | StartLine: 1, |
| 993 | EndLine: 1, |
| 994 | StartPos: 3, |
| 995 | EndPos: 12, |
| 996 | }, |
| 997 | Stmts: []node.Node{ |
| 998 | &stmt.Expression{ |
| 999 | Position: &position.Position{ |
| 1000 | StartLine: 1, |
| 1001 | EndLine: 1, |
| 1002 | StartPos: 3, |
| 1003 | EndPos: 12, |
| 1004 | }, |
| 1005 | Expr: &binary.LogicalOr{ |
| 1006 | Position: &position.Position{ |
| 1007 | StartLine: 1, |
| 1008 | EndLine: 1, |
| 1009 | StartPos: 3, |
| 1010 | EndPos: 11, |
| 1011 | }, |
| 1012 | Left: &expr.Variable{ |
| 1013 | Position: &position.Position{ |
| 1014 | StartLine: 1, |
| 1015 | EndLine: 1, |
| 1016 | StartPos: 3, |
| 1017 | EndPos: 5, |
| 1018 | }, |
| 1019 | VarName: &node.Identifier{ |
| 1020 | Position: &position.Position{ |
| 1021 | StartLine: 1, |
| 1022 | EndLine: 1, |
| 1023 | StartPos: 3, |
| 1024 | EndPos: 5, |
| 1025 | }, |
| 1026 | Value: "a", |
| 1027 | }, |
| 1028 | }, |
| 1029 | Right: &expr.Variable{ |
| 1030 | Position: &position.Position{ |
| 1031 | StartLine: 1, |
| 1032 | EndLine: 1, |
| 1033 | StartPos: 9, |
| 1034 | EndPos: 11, |
| 1035 | }, |
| 1036 | VarName: &node.Identifier{ |
| 1037 | Position: &position.Position{ |
| 1038 | StartLine: 1, |
| 1039 | EndLine: 1, |
| 1040 | StartPos: 9, |
| 1041 | EndPos: 11, |
| 1042 | }, |
| 1043 | Value: "b", |
| 1044 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…