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

Function TestShiftRight

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

Source from the content-addressed store, hash-verified

1735}
1736
1737func TestShiftRight(t *testing.T) {
1738 src := `<? $a >> $b;`
1739
1740 expected := &node.Root{
1741 Position: &position.Position{
1742 StartLine: 1,
1743 EndLine: 1,
1744 StartPos: 3,
1745 EndPos: 12,
1746 },
1747 Stmts: []node.Node{
1748 &stmt.Expression{
1749 Position: &position.Position{
1750 StartLine: 1,
1751 EndLine: 1,
1752 StartPos: 3,
1753 EndPos: 12,
1754 },
1755 Expr: &binary.ShiftRight{
1756 Position: &position.Position{
1757 StartLine: 1,
1758 EndLine: 1,
1759 StartPos: 3,
1760 EndPos: 11,
1761 },
1762 Left: &expr.Variable{
1763 Position: &position.Position{
1764 StartLine: 1,
1765 EndLine: 1,
1766 StartPos: 3,
1767 EndPos: 5,
1768 },
1769 VarName: &node.Identifier{
1770 Position: &position.Position{
1771 StartLine: 1,
1772 EndLine: 1,
1773 StartPos: 3,
1774 EndPos: 5,
1775 },
1776 Value: "a",
1777 },
1778 },
1779 Right: &expr.Variable{
1780 Position: &position.Position{
1781 StartLine: 1,
1782 EndLine: 1,
1783 StartPos: 9,
1784 EndPos: 11,
1785 },
1786 VarName: &node.Identifier{
1787 Position: &position.Position{
1788 StartLine: 1,
1789 EndLine: 1,
1790 StartPos: 9,
1791 EndPos: 11,
1792 },
1793 Value: "b",
1794 },

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…