(t *testing.T)
| 1960 | } |
| 1961 | |
| 1962 | func TestPrinterPrintInstanceOf(t *testing.T) { |
| 1963 | o := bytes.NewBufferString("") |
| 1964 | |
| 1965 | p := printer.NewPrinter(o) |
| 1966 | p.Print(&expr.InstanceOf{ |
| 1967 | Expr: &expr.Variable{ |
| 1968 | VarName: &node.Identifier{Value: "var"}, |
| 1969 | }, |
| 1970 | Class: &name.Name{Parts: []node.Node{&name.NamePart{Value: "Foo"}}}, |
| 1971 | }) |
| 1972 | |
| 1973 | expected := `$var instanceof Foo` |
| 1974 | actual := o.String() |
| 1975 | |
| 1976 | if expected != actual { |
| 1977 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1978 | } |
| 1979 | } |
| 1980 | |
| 1981 | func TestPrinterPrintIsset(t *testing.T) { |
| 1982 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…