(t *testing.T)
| 3466 | } |
| 3467 | |
| 3468 | func TestPrinterPrintStmtElseExpr(t *testing.T) { |
| 3469 | o := bytes.NewBufferString("") |
| 3470 | |
| 3471 | p := printer.NewPrinter(o) |
| 3472 | p.Print(&stmt.Else{ |
| 3473 | Stmt: &stmt.Expression{Expr: &scalar.String{Value: "'bar'"}}, |
| 3474 | }) |
| 3475 | |
| 3476 | expected := `else 'bar';` |
| 3477 | actual := o.String() |
| 3478 | |
| 3479 | if expected != actual { |
| 3480 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 3481 | } |
| 3482 | } |
| 3483 | |
| 3484 | func TestPrinterPrintStmtElseNop(t *testing.T) { |
| 3485 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…