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

Function TestGreater

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

Source from the content-addressed store, hash-verified

760}
761
762func TestGreater(t *testing.T) {
763 src := `<? $a > $b;`
764
765 expected := &node.Root{
766 Position: &position.Position{
767 StartLine: 1,
768 EndLine: 1,
769 StartPos: 3,
770 EndPos: 11,
771 },
772 Stmts: []node.Node{
773 &stmt.Expression{
774 Position: &position.Position{
775 StartLine: 1,
776 EndLine: 1,
777 StartPos: 3,
778 EndPos: 11,
779 },
780 Expr: &binary.Greater{
781 Position: &position.Position{
782 StartLine: 1,
783 EndLine: 1,
784 StartPos: 3,
785 EndPos: 10,
786 },
787 Left: &expr.Variable{
788 Position: &position.Position{
789 StartLine: 1,
790 EndLine: 1,
791 StartPos: 3,
792 EndPos: 5,
793 },
794 VarName: &node.Identifier{
795 Position: &position.Position{
796 StartLine: 1,
797 EndLine: 1,
798 StartPos: 3,
799 EndPos: 5,
800 },
801 Value: "a",
802 },
803 },
804 Right: &expr.Variable{
805 Position: &position.Position{
806 StartLine: 1,
807 EndLine: 1,
808 StartPos: 8,
809 EndPos: 10,
810 },
811 VarName: &node.Identifier{
812 Position: &position.Position{
813 StartLine: 1,
814 EndLine: 1,
815 StartPos: 8,
816 EndPos: 10,
817 },
818 Value: "b",
819 },

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…