(t *testing.T)
| 2511 | } |
| 2512 | |
| 2513 | func TestPrinterPrintYieldFrom(t *testing.T) { |
| 2514 | o := bytes.NewBufferString("") |
| 2515 | |
| 2516 | p := printer.NewPrinter(o) |
| 2517 | p.Print(&expr.YieldFrom{ |
| 2518 | Expr: &expr.Variable{ |
| 2519 | VarName: &node.Identifier{Value: "var"}, |
| 2520 | }, |
| 2521 | }) |
| 2522 | |
| 2523 | expected := `yield from $var` |
| 2524 | actual := o.String() |
| 2525 | |
| 2526 | if expected != actual { |
| 2527 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 2528 | } |
| 2529 | } |
| 2530 | |
| 2531 | func TestPrinterPrintYield(t *testing.T) { |
| 2532 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…