(t *testing.T)
| 671 | } |
| 672 | |
| 673 | func TestPrinterPrintAssignMod(t *testing.T) { |
| 674 | o := bytes.NewBufferString("") |
| 675 | |
| 676 | p := printer.NewPrinter(o) |
| 677 | p.Print(&assign.Mod{ |
| 678 | Variable: &expr.Variable{ |
| 679 | VarName: &node.Identifier{Value: "a"}, |
| 680 | }, |
| 681 | Expression: &expr.Variable{ |
| 682 | VarName: &node.Identifier{Value: "b"}, |
| 683 | }, |
| 684 | }) |
| 685 | |
| 686 | expected := `$a%=$b` |
| 687 | actual := o.String() |
| 688 | |
| 689 | if expected != actual { |
| 690 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 691 | } |
| 692 | } |
| 693 | |
| 694 | func TestPrinterPrintAssignMul(t *testing.T) { |
| 695 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…