binary
(t *testing.T)
| 799 | // binary |
| 800 | |
| 801 | func TestPrinterPrintBinaryBitwiseAnd(t *testing.T) { |
| 802 | o := bytes.NewBufferString("") |
| 803 | |
| 804 | p := printer.NewPrinter(o) |
| 805 | p.Print(&binary.BitwiseAnd{ |
| 806 | Left: &expr.Variable{ |
| 807 | VarName: &node.Identifier{Value: "a"}, |
| 808 | }, |
| 809 | Right: &expr.Variable{ |
| 810 | VarName: &node.Identifier{Value: "b"}, |
| 811 | }, |
| 812 | }) |
| 813 | |
| 814 | expected := `$a&$b` |
| 815 | actual := o.String() |
| 816 | |
| 817 | if expected != actual { |
| 818 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 819 | } |
| 820 | } |
| 821 | |
| 822 | func TestPrinterPrintBinaryBitwiseOr(t *testing.T) { |
| 823 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…