MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestBitwiseOr

Function TestBitwiseOr

node/expr/binary/t_binary_op_test.go:92–165  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

90}
91
92func TestBitwiseOr(t *testing.T) {
93 src := `<? $a | $b;`
94
95 expected := &node.Root{
96 Position: &position.Position{
97 StartLine: 1,
98 EndLine: 1,
99 StartPos: 3,
100 EndPos: 11,
101 },
102 Stmts: []node.Node{
103 &stmt.Expression{
104 Position: &position.Position{
105 StartLine: 1,
106 EndLine: 1,
107 StartPos: 3,
108 EndPos: 11,
109 },
110 Expr: &binary.BitwiseOr{
111 Position: &position.Position{
112 StartLine: 1,
113 EndLine: 1,
114 StartPos: 3,
115 EndPos: 10,
116 },
117 Left: &expr.Variable{
118 Position: &position.Position{
119 StartLine: 1,
120 EndLine: 1,
121 StartPos: 3,
122 EndPos: 5,
123 },
124 VarName: &node.Identifier{
125 Position: &position.Position{
126 StartLine: 1,
127 EndLine: 1,
128 StartPos: 3,
129 EndPos: 5,
130 },
131 Value: "a",
132 },
133 },
134 Right: &expr.Variable{
135 Position: &position.Position{
136 StartLine: 1,
137 EndLine: 1,
138 StartPos: 8,
139 EndPos: 10,
140 },
141 VarName: &node.Identifier{
142 Position: &position.Position{
143 StartLine: 1,
144 EndLine: 1,
145 StartPos: 8,
146 EndPos: 10,
147 },
148 Value: "b",
149 },

Callers

nothing calls this directly

Calls 4

ParseMethod · 0.95
GetRootNodeMethod · 0.95
NewParserFunction · 0.92
NewParserFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…