(t *testing.T)
| 4014 | } |
| 4015 | |
| 4016 | func TestPrintUse(t *testing.T) { |
| 4017 | o := bytes.NewBufferString("") |
| 4018 | |
| 4019 | p := printer.NewPrettyPrinter(o, " ") |
| 4020 | p.Print(&stmt.Use{ |
| 4021 | UseType: &node.Identifier{Value: "function"}, |
| 4022 | Use: &name.Name{Parts: []node.Node{&name.NamePart{Value: "Foo"}}}, |
| 4023 | Alias: &node.Identifier{Value: "Bar"}, |
| 4024 | }) |
| 4025 | |
| 4026 | expected := `function Foo as Bar` |
| 4027 | actual := o.String() |
| 4028 | |
| 4029 | if expected != actual { |
| 4030 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 4031 | } |
| 4032 | } |
| 4033 | |
| 4034 | func TestPrintWhileStmtList(t *testing.T) { |
| 4035 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…