(t *testing.T)
| 608 | } |
| 609 | |
| 610 | func TestPrinterPrintAssignConcat(t *testing.T) { |
| 611 | o := bytes.NewBufferString("") |
| 612 | |
| 613 | p := printer.NewPrinter(o) |
| 614 | p.Print(&assign.Concat{ |
| 615 | Variable: &expr.Variable{ |
| 616 | VarName: &node.Identifier{Value: "a"}, |
| 617 | }, |
| 618 | Expression: &expr.Variable{ |
| 619 | VarName: &node.Identifier{Value: "b"}, |
| 620 | }, |
| 621 | }) |
| 622 | |
| 623 | expected := `$a.=$b` |
| 624 | actual := o.String() |
| 625 | |
| 626 | if expected != actual { |
| 627 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | func TestPrinterPrintAssignDiv(t *testing.T) { |
| 632 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…