(t *testing.T)
| 4005 | } |
| 4006 | |
| 4007 | func TestPrinterPrintReturn(t *testing.T) { |
| 4008 | o := bytes.NewBufferString("") |
| 4009 | |
| 4010 | p := printer.NewPrinter(o) |
| 4011 | p.Print(&stmt.Return{ |
| 4012 | Expr: &scalar.Lnumber{Value: "1"}, |
| 4013 | }) |
| 4014 | |
| 4015 | expected := `return 1;` |
| 4016 | actual := o.String() |
| 4017 | |
| 4018 | if expected != actual { |
| 4019 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 4020 | } |
| 4021 | } |
| 4022 | |
| 4023 | func TestPrinterPrintStaticVar(t *testing.T) { |
| 4024 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…