(t *testing.T)
| 1433 | } |
| 1434 | |
| 1435 | func TestPrintExprConstFetch(t *testing.T) { |
| 1436 | o := bytes.NewBufferString("") |
| 1437 | |
| 1438 | p := printer.NewPrettyPrinter(o, " ") |
| 1439 | p.Print(&expr.ConstFetch{ |
| 1440 | Constant: &name.Name{Parts: []node.Node{&name.NamePart{Value: "null"}}}, |
| 1441 | }) |
| 1442 | |
| 1443 | expected := "null" |
| 1444 | actual := o.String() |
| 1445 | |
| 1446 | if expected != actual { |
| 1447 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1448 | } |
| 1449 | } |
| 1450 | |
| 1451 | func TestPrintEmpty(t *testing.T) { |
| 1452 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…