(t *testing.T)
| 2878 | } |
| 2879 | |
| 2880 | func TestPrinterPrintStmtCaseEmpty(t *testing.T) { |
| 2881 | o := bytes.NewBufferString("") |
| 2882 | |
| 2883 | p := printer.NewPrinter(o) |
| 2884 | p.Print(&stmt.Case{ |
| 2885 | Cond: &expr.Variable{ |
| 2886 | VarName: &node.Identifier{Value: "a"}, |
| 2887 | }, |
| 2888 | Stmts: []node.Node{}, |
| 2889 | }) |
| 2890 | |
| 2891 | expected := "case $a:" |
| 2892 | actual := o.String() |
| 2893 | |
| 2894 | if expected != actual { |
| 2895 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2896 | } |
| 2897 | } |
| 2898 | |
| 2899 | func TestPrinterPrintStmtCatch(t *testing.T) { |
| 2900 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…