(t *testing.T)
| 1794 | } |
| 1795 | |
| 1796 | func TestPrintExprReference(t *testing.T) { |
| 1797 | o := bytes.NewBufferString("") |
| 1798 | |
| 1799 | p := printer.NewPrettyPrinter(o, " ") |
| 1800 | p.Print(&expr.Reference{ |
| 1801 | Variable: &expr.Variable{VarName: &node.Identifier{Value: "foo"}}, |
| 1802 | }) |
| 1803 | |
| 1804 | expected := `&$foo` |
| 1805 | actual := o.String() |
| 1806 | |
| 1807 | if expected != actual { |
| 1808 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1809 | } |
| 1810 | } |
| 1811 | |
| 1812 | func TestPrintRequire(t *testing.T) { |
| 1813 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…