(t *testing.T)
| 4040 | } |
| 4041 | |
| 4042 | func TestPrinterPrintStatic(t *testing.T) { |
| 4043 | o := bytes.NewBufferString("") |
| 4044 | |
| 4045 | p := printer.NewPrinter(o) |
| 4046 | p.Print(&stmt.Static{ |
| 4047 | Vars: []node.Node{ |
| 4048 | &stmt.StaticVar{ |
| 4049 | Variable: &expr.Variable{ |
| 4050 | VarName: &node.Identifier{Value: "a"}, |
| 4051 | }, |
| 4052 | }, |
| 4053 | &stmt.StaticVar{ |
| 4054 | Variable: &expr.Variable{ |
| 4055 | VarName: &node.Identifier{Value: "b"}, |
| 4056 | }, |
| 4057 | }, |
| 4058 | }, |
| 4059 | }) |
| 4060 | |
| 4061 | expected := `static$a,$b;` |
| 4062 | actual := o.String() |
| 4063 | |
| 4064 | if expected != actual { |
| 4065 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 4066 | } |
| 4067 | } |
| 4068 | |
| 4069 | func TestPrinterPrintStmtList(t *testing.T) { |
| 4070 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…