MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestPrintLabel

Function TestPrintLabel

printer/pretty_printer_test.go:3475–3489  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3473}
3474
3475func TestPrintLabel(t *testing.T) {
3476 o := bytes.NewBufferString("")
3477
3478 p := printer.NewPrettyPrinter(o, " ")
3479 p.Print(&stmt.Label{
3480 LabelName: &node.Identifier{Value: "FOO"},
3481 })
3482
3483 expected := `FOO:`
3484 actual := o.String()
3485
3486 if expected != actual {
3487 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
3488 }
3489}
3490
3491func TestPrintNamespace(t *testing.T) {
3492 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrettyPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…