(t *testing.T)
| 2013 | } |
| 2014 | |
| 2015 | func TestPrintUnaryPlus(t *testing.T) { |
| 2016 | o := bytes.NewBufferString("") |
| 2017 | |
| 2018 | p := printer.NewPrettyPrinter(o, " ") |
| 2019 | p.Print(&expr.UnaryPlus{ |
| 2020 | Expr: &expr.Variable{VarName: &node.Identifier{Value: "var"}}, |
| 2021 | }) |
| 2022 | |
| 2023 | expected := `+$var` |
| 2024 | actual := o.String() |
| 2025 | |
| 2026 | if expected != actual { |
| 2027 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2028 | } |
| 2029 | } |
| 2030 | |
| 2031 | func TestPrintVariable(t *testing.T) { |
| 2032 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…