(t *testing.T)
| 1699 | } |
| 1700 | |
| 1701 | func TestPrintPostDec(t *testing.T) { |
| 1702 | o := bytes.NewBufferString("") |
| 1703 | |
| 1704 | p := printer.NewPrettyPrinter(o, " ") |
| 1705 | p.Print(&expr.PostDec{ |
| 1706 | Variable: &expr.Variable{VarName: &node.Identifier{Value: "var"}}, |
| 1707 | }) |
| 1708 | |
| 1709 | expected := `$var--` |
| 1710 | actual := o.String() |
| 1711 | |
| 1712 | if expected != actual { |
| 1713 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1714 | } |
| 1715 | } |
| 1716 | |
| 1717 | func TestPrintPostInc(t *testing.T) { |
| 1718 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…