(t *testing.T)
| 3498 | } |
| 3499 | |
| 3500 | func TestPrinterPrintExpression(t *testing.T) { |
| 3501 | o := bytes.NewBufferString("") |
| 3502 | |
| 3503 | p := printer.NewPrinter(o) |
| 3504 | p.Print(&stmt.Expression{ |
| 3505 | Expr: &expr.Variable{ |
| 3506 | VarName: &node.Identifier{Value: "a"}, |
| 3507 | }, |
| 3508 | }) |
| 3509 | |
| 3510 | expected := `$a;` |
| 3511 | actual := o.String() |
| 3512 | |
| 3513 | if expected != actual { |
| 3514 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 3515 | } |
| 3516 | } |
| 3517 | |
| 3518 | func TestPrinterPrintStmtFinally(t *testing.T) { |
| 3519 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…