(t *testing.T)
| 2547 | } |
| 2548 | |
| 2549 | func TestPrinterPrintYieldFull(t *testing.T) { |
| 2550 | o := bytes.NewBufferString("") |
| 2551 | |
| 2552 | p := printer.NewPrinter(o) |
| 2553 | p.Print(&expr.Yield{ |
| 2554 | Key: &expr.Variable{ |
| 2555 | VarName: &node.Identifier{Value: "k"}, |
| 2556 | }, |
| 2557 | Value: &expr.Variable{ |
| 2558 | VarName: &node.Identifier{Value: "var"}, |
| 2559 | }, |
| 2560 | }) |
| 2561 | |
| 2562 | expected := `yield $k=>$var` |
| 2563 | actual := o.String() |
| 2564 | |
| 2565 | if expected != actual { |
| 2566 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2567 | } |
| 2568 | } |
| 2569 | |
| 2570 | // stmt |
| 2571 |
nothing calls this directly
no test coverage detected
searching dependent graphs…