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

Function TestBitwiseAnd

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

Source from the content-addressed store, hash-verified

15)
16
17func TestBitwiseAnd(t *testing.T) {
18 src := `<? $a & $b;`
19
20 expected := &node.Root{
21 Position: &position.Position{
22 StartLine: 1,
23 EndLine: 1,
24 StartPos: 3,
25 EndPos: 11,
26 },
27 Stmts: []node.Node{
28 &stmt.Expression{
29 Position: &position.Position{
30 StartLine: 1,
31 EndLine: 1,
32 StartPos: 3,
33 EndPos: 11,
34 },
35 Expr: &binary.BitwiseAnd{
36 Position: &position.Position{
37 StartLine: 1,
38 EndLine: 1,
39 StartPos: 3,
40 EndPos: 10,
41 },
42 Left: &expr.Variable{
43 Position: &position.Position{
44 StartLine: 1,
45 EndLine: 1,
46 StartPos: 3,
47 EndPos: 5,
48 },
49 VarName: &node.Identifier{
50 Position: &position.Position{
51 StartLine: 1,
52 EndLine: 1,
53 StartPos: 3,
54 EndPos: 5,
55 },
56 Value: "a",
57 },
58 },
59 Right: &expr.Variable{
60 Position: &position.Position{
61 StartLine: 1,
62 EndLine: 1,
63 StartPos: 8,
64 EndPos: 10,
65 },
66 VarName: &node.Identifier{
67 Position: &position.Position{
68 StartLine: 1,
69 EndLine: 1,
70 StartPos: 8,
71 EndPos: 10,
72 },
73 Value: "b",
74 },

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…