(t *testing.T)
| 2127 | } |
| 2128 | |
| 2129 | func TestPrinterPrintPostInc(t *testing.T) { |
| 2130 | o := bytes.NewBufferString("") |
| 2131 | |
| 2132 | p := printer.NewPrinter(o) |
| 2133 | p.Print(&expr.PostInc{ |
| 2134 | Variable: &expr.Variable{ |
| 2135 | VarName: &node.Identifier{Value: "var"}, |
| 2136 | }, |
| 2137 | }) |
| 2138 | |
| 2139 | expected := `$var++` |
| 2140 | actual := o.String() |
| 2141 | |
| 2142 | if expected != actual { |
| 2143 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2144 | } |
| 2145 | } |
| 2146 | |
| 2147 | func TestPrinterPrintPreDec(t *testing.T) { |
| 2148 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…