(t *testing.T)
| 3678 | } |
| 3679 | |
| 3680 | func TestPrinterPrintStmtGroupUse(t *testing.T) { |
| 3681 | o := bytes.NewBufferString("") |
| 3682 | |
| 3683 | p := printer.NewPrinter(o) |
| 3684 | p.Print(&stmt.GroupUse{ |
| 3685 | UseType: &node.Identifier{Value: "function"}, |
| 3686 | Prefix: &name.Name{Parts: []node.Node{&name.NamePart{Value: "Foo"}}}, |
| 3687 | UseList: []node.Node{ |
| 3688 | &stmt.Use{ |
| 3689 | Use: &name.Name{Parts: []node.Node{&name.NamePart{Value: "Bar"}}}, |
| 3690 | Alias: &node.Identifier{Value: "Baz"}, |
| 3691 | }, |
| 3692 | &stmt.Use{ |
| 3693 | Use: &name.Name{Parts: []node.Node{&name.NamePart{Value: "Quuz"}}}, |
| 3694 | }, |
| 3695 | }, |
| 3696 | }) |
| 3697 | |
| 3698 | expected := `use function Foo\{Bar as Baz,Quuz};` |
| 3699 | actual := o.String() |
| 3700 | |
| 3701 | if expected != actual { |
| 3702 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 3703 | } |
| 3704 | } |
| 3705 | |
| 3706 | func TestPrinterPrintHaltCompiler(t *testing.T) { |
| 3707 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…