(t *testing.T)
| 883 | } |
| 884 | |
| 885 | func TestPrinterPrintBinaryBooleanOr(t *testing.T) { |
| 886 | o := bytes.NewBufferString("") |
| 887 | |
| 888 | p := printer.NewPrinter(o) |
| 889 | p.Print(&binary.BooleanOr{ |
| 890 | Left: &expr.Variable{ |
| 891 | VarName: &node.Identifier{Value: "a"}, |
| 892 | }, |
| 893 | Right: &expr.Variable{ |
| 894 | VarName: &node.Identifier{Value: "b"}, |
| 895 | }, |
| 896 | }) |
| 897 | |
| 898 | expected := `$a||$b` |
| 899 | actual := o.String() |
| 900 | |
| 901 | if expected != actual { |
| 902 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 903 | } |
| 904 | } |
| 905 | |
| 906 | func TestPrinterPrintBinaryCoalesce(t *testing.T) { |
| 907 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…