(t *testing.T)
| 4281 | } |
| 4282 | |
| 4283 | func TestPrinterPrintStmtTraitUse(t *testing.T) { |
| 4284 | o := bytes.NewBufferString("") |
| 4285 | |
| 4286 | p := printer.NewPrinter(o) |
| 4287 | p.Print(&stmt.TraitUse{ |
| 4288 | Traits: []node.Node{ |
| 4289 | &name.Name{Parts: []node.Node{&name.NamePart{Value: "Foo"}}}, |
| 4290 | &name.Name{Parts: []node.Node{&name.NamePart{Value: "Bar"}}}, |
| 4291 | }, |
| 4292 | TraitAdaptationList: &stmt.Nop{}, |
| 4293 | }) |
| 4294 | |
| 4295 | expected := `use Foo,Bar;` |
| 4296 | actual := o.String() |
| 4297 | |
| 4298 | if expected != actual { |
| 4299 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 4300 | } |
| 4301 | } |
| 4302 | |
| 4303 | func TestPrinterPrintStmtTraitAdaptations(t *testing.T) { |
| 4304 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…