(t *testing.T)
| 4450 | } |
| 4451 | |
| 4452 | func TestPrinterPrintUse(t *testing.T) { |
| 4453 | o := bytes.NewBufferString("") |
| 4454 | |
| 4455 | p := printer.NewPrinter(o) |
| 4456 | p.Print(&stmt.Use{ |
| 4457 | UseType: &node.Identifier{Value: "function"}, |
| 4458 | Use: &name.Name{Parts: []node.Node{&name.NamePart{Value: "Foo"}}}, |
| 4459 | Alias: &node.Identifier{Value: "Bar"}, |
| 4460 | }) |
| 4461 | |
| 4462 | expected := `function Foo as Bar` |
| 4463 | actual := o.String() |
| 4464 | |
| 4465 | if expected != actual { |
| 4466 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 4467 | } |
| 4468 | } |
| 4469 | |
| 4470 | func TestPrinterPrintWhileStmtList(t *testing.T) { |
| 4471 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…