(t *testing.T)
| 926 | } |
| 927 | |
| 928 | func TestPrintBinaryMod(t *testing.T) { |
| 929 | o := bytes.NewBufferString("") |
| 930 | |
| 931 | p := printer.NewPrettyPrinter(o, " ") |
| 932 | p.Print(&binary.Mod{ |
| 933 | Left: &expr.Variable{VarName: &node.Identifier{Value: "a"}}, |
| 934 | Right: &expr.Variable{VarName: &node.Identifier{Value: "b"}}, |
| 935 | }) |
| 936 | |
| 937 | expected := `$a % $b` |
| 938 | actual := o.String() |
| 939 | |
| 940 | if expected != actual { |
| 941 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 942 | } |
| 943 | } |
| 944 | |
| 945 | func TestPrintBinaryMul(t *testing.T) { |
| 946 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…