(t *testing.T)
| 310 | } |
| 311 | |
| 312 | func TestPrinterPrintNameRelative(t *testing.T) { |
| 313 | o := bytes.NewBufferString("") |
| 314 | |
| 315 | p := printer.NewPrinter(o) |
| 316 | p.Print(&name.Relative{ |
| 317 | Parts: []node.Node{ |
| 318 | &name.NamePart{ |
| 319 | Value: "Foo", |
| 320 | }, |
| 321 | &name.NamePart{ |
| 322 | Value: "Bar", |
| 323 | }, |
| 324 | }, |
| 325 | }) |
| 326 | |
| 327 | expected := "namespace\\Foo\\Bar" |
| 328 | actual := o.String() |
| 329 | |
| 330 | if expected != actual { |
| 331 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | // scalar |
| 336 |
nothing calls this directly
no test coverage detected
searching dependent graphs…