(t *testing.T)
| 1135 | } |
| 1136 | |
| 1137 | func TestPrinterPrintBinaryMod(t *testing.T) { |
| 1138 | o := bytes.NewBufferString("") |
| 1139 | |
| 1140 | p := printer.NewPrinter(o) |
| 1141 | p.Print(&binary.Mod{ |
| 1142 | Left: &expr.Variable{ |
| 1143 | VarName: &node.Identifier{Value: "a"}, |
| 1144 | }, |
| 1145 | Right: &expr.Variable{ |
| 1146 | VarName: &node.Identifier{Value: "b"}, |
| 1147 | }, |
| 1148 | }) |
| 1149 | |
| 1150 | expected := `$a%$b` |
| 1151 | actual := o.String() |
| 1152 | |
| 1153 | if expected != actual { |
| 1154 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1155 | } |
| 1156 | } |
| 1157 | |
| 1158 | func TestPrinterPrintBinaryMul(t *testing.T) { |
| 1159 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…