(t *testing.T)
| 264 | } |
| 265 | |
| 266 | func TestPrinterPrintNameName(t *testing.T) { |
| 267 | o := bytes.NewBufferString("") |
| 268 | |
| 269 | p := printer.NewPrinter(o) |
| 270 | p.Print(&name.Name{ |
| 271 | Parts: []node.Node{ |
| 272 | &name.NamePart{ |
| 273 | Value: "Foo", |
| 274 | }, |
| 275 | &name.NamePart{ |
| 276 | Value: "Bar", |
| 277 | }, |
| 278 | }, |
| 279 | }) |
| 280 | |
| 281 | expected := "Foo\\Bar" |
| 282 | actual := o.String() |
| 283 | |
| 284 | if expected != actual { |
| 285 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | func TestPrinterPrintNameFullyQualified(t *testing.T) { |
| 290 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…