(t *testing.T)
| 1960 | } |
| 1961 | |
| 1962 | func TestSpaceship(t *testing.T) { |
| 1963 | src := `<? $a <=> $b;` |
| 1964 | |
| 1965 | expected := &node.Root{ |
| 1966 | Position: &position.Position{ |
| 1967 | StartLine: 1, |
| 1968 | EndLine: 1, |
| 1969 | StartPos: 3, |
| 1970 | EndPos: 13, |
| 1971 | }, |
| 1972 | Stmts: []node.Node{ |
| 1973 | &stmt.Expression{ |
| 1974 | Position: &position.Position{ |
| 1975 | StartLine: 1, |
| 1976 | EndLine: 1, |
| 1977 | StartPos: 3, |
| 1978 | EndPos: 13, |
| 1979 | }, |
| 1980 | Expr: &binary.Spaceship{ |
| 1981 | Position: &position.Position{ |
| 1982 | StartLine: 1, |
| 1983 | EndLine: 1, |
| 1984 | StartPos: 3, |
| 1985 | EndPos: 12, |
| 1986 | }, |
| 1987 | Left: &expr.Variable{ |
| 1988 | Position: &position.Position{ |
| 1989 | StartLine: 1, |
| 1990 | EndLine: 1, |
| 1991 | StartPos: 3, |
| 1992 | EndPos: 5, |
| 1993 | }, |
| 1994 | VarName: &node.Identifier{ |
| 1995 | Position: &position.Position{ |
| 1996 | StartLine: 1, |
| 1997 | EndLine: 1, |
| 1998 | StartPos: 3, |
| 1999 | EndPos: 5, |
| 2000 | }, |
| 2001 | Value: "a", |
| 2002 | }, |
| 2003 | }, |
| 2004 | Right: &expr.Variable{ |
| 2005 | Position: &position.Position{ |
| 2006 | StartLine: 1, |
| 2007 | EndLine: 1, |
| 2008 | StartPos: 10, |
| 2009 | EndPos: 12, |
| 2010 | }, |
| 2011 | VarName: &node.Identifier{ |
| 2012 | Position: &position.Position{ |
| 2013 | StartLine: 1, |
| 2014 | EndLine: 1, |
| 2015 | StartPos: 10, |
| 2016 | EndPos: 12, |
| 2017 | }, |
| 2018 | Value: "b", |
| 2019 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…