(t *testing.T)
| 2529 | } |
| 2530 | |
| 2531 | func TestPrinterPrintYield(t *testing.T) { |
| 2532 | o := bytes.NewBufferString("") |
| 2533 | |
| 2534 | p := printer.NewPrinter(o) |
| 2535 | p.Print(&expr.Yield{ |
| 2536 | Value: &expr.Variable{ |
| 2537 | VarName: &node.Identifier{Value: "var"}, |
| 2538 | }, |
| 2539 | }) |
| 2540 | |
| 2541 | expected := `yield $var` |
| 2542 | actual := o.String() |
| 2543 | |
| 2544 | if expected != actual { |
| 2545 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2546 | } |
| 2547 | } |
| 2548 | |
| 2549 | func TestPrinterPrintYieldFull(t *testing.T) { |
| 2550 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…