(t *testing.T)
| 2837 | } |
| 2838 | |
| 2839 | func TestPrinterPrintStmtBreak(t *testing.T) { |
| 2840 | o := bytes.NewBufferString("") |
| 2841 | |
| 2842 | p := printer.NewPrinter(o) |
| 2843 | p.Print(&stmt.Break{ |
| 2844 | Expr: &scalar.Lnumber{ |
| 2845 | Value: "1", |
| 2846 | }, |
| 2847 | }) |
| 2848 | |
| 2849 | expected := "break 1;" |
| 2850 | actual := o.String() |
| 2851 | |
| 2852 | if expected != actual { |
| 2853 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2854 | } |
| 2855 | } |
| 2856 | |
| 2857 | func TestPrinterPrintStmtCase(t *testing.T) { |
| 2858 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…