(t *testing.T)
| 1781 | } |
| 1782 | |
| 1783 | func TestPrinterPrintExprConstFetch(t *testing.T) { |
| 1784 | o := bytes.NewBufferString("") |
| 1785 | |
| 1786 | p := printer.NewPrinter(o) |
| 1787 | p.Print(&expr.ConstFetch{ |
| 1788 | Constant: &name.Name{Parts: []node.Node{&name.NamePart{Value: "null"}}}, |
| 1789 | }) |
| 1790 | |
| 1791 | expected := "null" |
| 1792 | actual := o.String() |
| 1793 | |
| 1794 | if expected != actual { |
| 1795 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1796 | } |
| 1797 | } |
| 1798 | |
| 1799 | func TestPrinterPrintEmpty(t *testing.T) { |
| 1800 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…