(t *testing.T)
| 2163 | } |
| 2164 | |
| 2165 | func TestPrinterPrintPreInc(t *testing.T) { |
| 2166 | o := bytes.NewBufferString("") |
| 2167 | |
| 2168 | p := printer.NewPrinter(o) |
| 2169 | p.Print(&expr.PreInc{ |
| 2170 | Variable: &expr.Variable{ |
| 2171 | VarName: &node.Identifier{Value: "var"}, |
| 2172 | }, |
| 2173 | }) |
| 2174 | |
| 2175 | expected := `++$var` |
| 2176 | actual := o.String() |
| 2177 | |
| 2178 | if expected != actual { |
| 2179 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2180 | } |
| 2181 | } |
| 2182 | |
| 2183 | func TestPrinterPrintPrint(t *testing.T) { |
| 2184 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…