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

Function TestShiftLeft

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

Source from the content-addressed store, hash-verified

1660}
1661
1662func TestShiftLeft(t *testing.T) {
1663 src := `<? $a << $b;`
1664
1665 expected := &node.Root{
1666 Position: &position.Position{
1667 StartLine: 1,
1668 EndLine: 1,
1669 StartPos: 3,
1670 EndPos: 12,
1671 },
1672 Stmts: []node.Node{
1673 &stmt.Expression{
1674 Position: &position.Position{
1675 StartLine: 1,
1676 EndLine: 1,
1677 StartPos: 3,
1678 EndPos: 12,
1679 },
1680 Expr: &binary.ShiftLeft{
1681 Position: &position.Position{
1682 StartLine: 1,
1683 EndLine: 1,
1684 StartPos: 3,
1685 EndPos: 11,
1686 },
1687 Left: &expr.Variable{
1688 Position: &position.Position{
1689 StartLine: 1,
1690 EndLine: 1,
1691 StartPos: 3,
1692 EndPos: 5,
1693 },
1694 VarName: &node.Identifier{
1695 Position: &position.Position{
1696 StartLine: 1,
1697 EndLine: 1,
1698 StartPos: 3,
1699 EndPos: 5,
1700 },
1701 Value: "a",
1702 },
1703 },
1704 Right: &expr.Variable{
1705 Position: &position.Position{
1706 StartLine: 1,
1707 EndLine: 1,
1708 StartPos: 9,
1709 EndPos: 11,
1710 },
1711 VarName: &node.Identifier{
1712 Position: &position.Position{
1713 StartLine: 1,
1714 EndLine: 1,
1715 StartPos: 9,
1716 EndPos: 11,
1717 },
1718 Value: "b",
1719 },

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…