(t *testing.T)
| 1261 | } |
| 1262 | |
| 1263 | func TestPrinterPrintBinaryShiftLeft(t *testing.T) { |
| 1264 | o := bytes.NewBufferString("") |
| 1265 | |
| 1266 | p := printer.NewPrinter(o) |
| 1267 | p.Print(&binary.ShiftLeft{ |
| 1268 | Left: &expr.Variable{ |
| 1269 | VarName: &node.Identifier{Value: "a"}, |
| 1270 | }, |
| 1271 | Right: &expr.Variable{ |
| 1272 | VarName: &node.Identifier{Value: "b"}, |
| 1273 | }, |
| 1274 | }) |
| 1275 | |
| 1276 | expected := `$a<<$b` |
| 1277 | actual := o.String() |
| 1278 | |
| 1279 | if expected != actual { |
| 1280 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1281 | } |
| 1282 | } |
| 1283 | |
| 1284 | func TestPrinterPrintBinaryShiftRight(t *testing.T) { |
| 1285 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…