(t *testing.T)
| 1797 | } |
| 1798 | |
| 1799 | func TestPrinterPrintEmpty(t *testing.T) { |
| 1800 | o := bytes.NewBufferString("") |
| 1801 | |
| 1802 | p := printer.NewPrinter(o) |
| 1803 | p.Print(&expr.Empty{ |
| 1804 | Expr: &expr.Variable{ |
| 1805 | VarName: &node.Identifier{Value: "var"}, |
| 1806 | }, |
| 1807 | }) |
| 1808 | |
| 1809 | expected := `empty($var)` |
| 1810 | actual := o.String() |
| 1811 | |
| 1812 | if expected != actual { |
| 1813 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1814 | } |
| 1815 | } |
| 1816 | |
| 1817 | func TestPrinterPrettyPrinterrorSuppress(t *testing.T) { |
| 1818 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…