(t *testing.T)
| 2475 | } |
| 2476 | |
| 2477 | func TestPrinterPrintUnaryPlus(t *testing.T) { |
| 2478 | o := bytes.NewBufferString("") |
| 2479 | |
| 2480 | p := printer.NewPrinter(o) |
| 2481 | p.Print(&expr.UnaryPlus{ |
| 2482 | Expr: &expr.Variable{ |
| 2483 | VarName: &node.Identifier{Value: "var"}, |
| 2484 | }, |
| 2485 | }) |
| 2486 | |
| 2487 | expected := `+$var` |
| 2488 | actual := o.String() |
| 2489 | |
| 2490 | if expected != actual { |
| 2491 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2492 | } |
| 2493 | } |
| 2494 | |
| 2495 | func TestPrinterPrintVariable(t *testing.T) { |
| 2496 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…