(t *testing.T)
| 713 | } |
| 714 | |
| 715 | func TestPrinterPrintAssignPlus(t *testing.T) { |
| 716 | o := bytes.NewBufferString("") |
| 717 | |
| 718 | p := printer.NewPrinter(o) |
| 719 | p.Print(&assign.Plus{ |
| 720 | Variable: &expr.Variable{ |
| 721 | VarName: &node.Identifier{Value: "a"}, |
| 722 | }, |
| 723 | Expression: &expr.Variable{ |
| 724 | VarName: &node.Identifier{Value: "b"}, |
| 725 | }, |
| 726 | }) |
| 727 | |
| 728 | expected := `$a+=$b` |
| 729 | actual := o.String() |
| 730 | |
| 731 | if expected != actual { |
| 732 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 733 | } |
| 734 | } |
| 735 | |
| 736 | func TestPrinterPrintAssignPow(t *testing.T) { |
| 737 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…