(t *testing.T)
| 629 | } |
| 630 | |
| 631 | func TestPrinterPrintAssignDiv(t *testing.T) { |
| 632 | o := bytes.NewBufferString("") |
| 633 | |
| 634 | p := printer.NewPrinter(o) |
| 635 | p.Print(&assign.Div{ |
| 636 | Variable: &expr.Variable{ |
| 637 | VarName: &node.Identifier{Value: "a"}, |
| 638 | }, |
| 639 | Expression: &expr.Variable{ |
| 640 | VarName: &node.Identifier{Value: "b"}, |
| 641 | }, |
| 642 | }) |
| 643 | |
| 644 | expected := `$a/=$b` |
| 645 | actual := o.String() |
| 646 | |
| 647 | if expected != actual { |
| 648 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | func TestPrinterPrintAssignMinus(t *testing.T) { |
| 653 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…