(t *testing.T)
| 2109 | } |
| 2110 | |
| 2111 | func TestPrinterPrintPostDec(t *testing.T) { |
| 2112 | o := bytes.NewBufferString("") |
| 2113 | |
| 2114 | p := printer.NewPrinter(o) |
| 2115 | p.Print(&expr.PostDec{ |
| 2116 | Variable: &expr.Variable{ |
| 2117 | VarName: &node.Identifier{Value: "var"}, |
| 2118 | }, |
| 2119 | }) |
| 2120 | |
| 2121 | expected := `$var--` |
| 2122 | actual := o.String() |
| 2123 | |
| 2124 | if expected != actual { |
| 2125 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2126 | } |
| 2127 | } |
| 2128 | |
| 2129 | func TestPrinterPrintPostInc(t *testing.T) { |
| 2130 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…