(t *testing.T)
| 2987 | } |
| 2988 | |
| 2989 | func TestPrintExpression(t *testing.T) { |
| 2990 | o := bytes.NewBufferString("") |
| 2991 | |
| 2992 | p := printer.NewPrettyPrinter(o, " ") |
| 2993 | p.Print(&stmt.Expression{Expr: &expr.Variable{VarName: &node.Identifier{Value: "a"}}}) |
| 2994 | |
| 2995 | expected := `$a;` |
| 2996 | actual := o.String() |
| 2997 | |
| 2998 | if expected != actual { |
| 2999 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 3000 | } |
| 3001 | } |
| 3002 | |
| 3003 | func TestPrintStmtFinally(t *testing.T) { |
| 3004 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…