(t *testing.T)
| 755 | } |
| 756 | |
| 757 | func TestPrinterPrintAssignShiftLeft(t *testing.T) { |
| 758 | o := bytes.NewBufferString("") |
| 759 | |
| 760 | p := printer.NewPrinter(o) |
| 761 | p.Print(&assign.ShiftLeft{ |
| 762 | Variable: &expr.Variable{ |
| 763 | VarName: &node.Identifier{Value: "a"}, |
| 764 | }, |
| 765 | Expression: &expr.Variable{ |
| 766 | VarName: &node.Identifier{Value: "b"}, |
| 767 | }, |
| 768 | }) |
| 769 | |
| 770 | expected := `$a<<=$b` |
| 771 | actual := o.String() |
| 772 | |
| 773 | if expected != actual { |
| 774 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 775 | } |
| 776 | } |
| 777 | |
| 778 | func TestPrinterPrintAssignShiftRight(t *testing.T) { |
| 779 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…