(t *testing.T)
| 2145 | } |
| 2146 | |
| 2147 | func TestPrinterPrintPreDec(t *testing.T) { |
| 2148 | o := bytes.NewBufferString("") |
| 2149 | |
| 2150 | p := printer.NewPrinter(o) |
| 2151 | p.Print(&expr.PreDec{ |
| 2152 | Variable: &expr.Variable{ |
| 2153 | VarName: &node.Identifier{Value: "var"}, |
| 2154 | }, |
| 2155 | }) |
| 2156 | |
| 2157 | expected := `--$var` |
| 2158 | actual := o.String() |
| 2159 | |
| 2160 | if expected != actual { |
| 2161 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2162 | } |
| 2163 | } |
| 2164 | |
| 2165 | func TestPrinterPrintPreInc(t *testing.T) { |
| 2166 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…