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

Function TestEqual

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

Source from the content-addressed store, hash-verified

610}
611
612func TestEqual(t *testing.T) {
613 src := `<? $a == $b;`
614
615 expected := &node.Root{
616 Position: &position.Position{
617 StartLine: 1,
618 EndLine: 1,
619 StartPos: 3,
620 EndPos: 12,
621 },
622 Stmts: []node.Node{
623 &stmt.Expression{
624 Position: &position.Position{
625 StartLine: 1,
626 EndLine: 1,
627 StartPos: 3,
628 EndPos: 12,
629 },
630 Expr: &binary.Equal{
631 Position: &position.Position{
632 StartLine: 1,
633 EndLine: 1,
634 StartPos: 3,
635 EndPos: 11,
636 },
637 Left: &expr.Variable{
638 Position: &position.Position{
639 StartLine: 1,
640 EndLine: 1,
641 StartPos: 3,
642 EndPos: 5,
643 },
644 VarName: &node.Identifier{
645 Position: &position.Position{
646 StartLine: 1,
647 EndLine: 1,
648 StartPos: 3,
649 EndPos: 5,
650 },
651 Value: "a",
652 },
653 },
654 Right: &expr.Variable{
655 Position: &position.Position{
656 StartLine: 1,
657 EndLine: 1,
658 StartPos: 9,
659 EndPos: 11,
660 },
661 VarName: &node.Identifier{
662 Position: &position.Position{
663 StartLine: 1,
664 EndLine: 1,
665 StartPos: 9,
666 EndPos: 11,
667 },
668 Value: "b",
669 },

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…