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

Function TestBitwiseXor

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

Source from the content-addressed store, hash-verified

165}
166
167func TestBitwiseXor(t *testing.T) {
168 src := `<? $a ^ $b;`
169
170 expected := &node.Root{
171 Position: &position.Position{
172 StartLine: 1,
173 EndLine: 1,
174 StartPos: 3,
175 EndPos: 11,
176 },
177 Stmts: []node.Node{
178 &stmt.Expression{
179 Position: &position.Position{
180 StartLine: 1,
181 EndLine: 1,
182 StartPos: 3,
183 EndPos: 11,
184 },
185 Expr: &binary.BitwiseXor{
186 Position: &position.Position{
187 StartLine: 1,
188 EndLine: 1,
189 StartPos: 3,
190 EndPos: 10,
191 },
192 Left: &expr.Variable{
193 Position: &position.Position{
194 StartLine: 1,
195 EndLine: 1,
196 StartPos: 3,
197 EndPos: 5,
198 },
199 VarName: &node.Identifier{
200 Position: &position.Position{
201 StartLine: 1,
202 EndLine: 1,
203 StartPos: 3,
204 EndPos: 5,
205 },
206 Value: "a",
207 },
208 },
209 Right: &expr.Variable{
210 Position: &position.Position{
211 StartLine: 1,
212 EndLine: 1,
213 StartPos: 8,
214 EndPos: 10,
215 },
216 VarName: &node.Identifier{
217 Position: &position.Position{
218 StartLine: 1,
219 EndLine: 1,
220 StartPos: 8,
221 EndPos: 10,
222 },
223 Value: "b",
224 },

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…