(t *testing.T)
| 946 | } |
| 947 | |
| 948 | func TestPrinterPrintBinaryDiv(t *testing.T) { |
| 949 | o := bytes.NewBufferString("") |
| 950 | |
| 951 | p := printer.NewPrinter(o) |
| 952 | p.Print(&binary.Div{ |
| 953 | Left: &expr.Variable{ |
| 954 | VarName: &node.Identifier{Value: "a"}, |
| 955 | }, |
| 956 | Right: &expr.Variable{ |
| 957 | VarName: &node.Identifier{Value: "b"}, |
| 958 | }, |
| 959 | }) |
| 960 | |
| 961 | expected := `$a/$b` |
| 962 | actual := o.String() |
| 963 | |
| 964 | if expected != actual { |
| 965 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 966 | } |
| 967 | } |
| 968 | |
| 969 | func TestPrinterPrintBinaryEqual(t *testing.T) { |
| 970 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…