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

Function TestPrinterPrintAltElseEmpty

printer/printer_test.go:2638–2652  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2636}
2637
2638func TestPrinterPrintAltElseEmpty(t *testing.T) {
2639 o := bytes.NewBufferString("")
2640
2641 p := printer.NewPrinter(o)
2642 p.Print(&stmt.AltElse{
2643 Stmt: &stmt.StmtList{},
2644 })
2645
2646 expected := `else:`
2647 actual := o.String()
2648
2649 if expected != actual {
2650 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
2651 }
2652}
2653
2654func TestPrinterPrintAltFor(t *testing.T) {
2655 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…