(t *testing.T)
| 1282 | } |
| 1283 | |
| 1284 | func TestPrinterPrintBinaryShiftRight(t *testing.T) { |
| 1285 | o := bytes.NewBufferString("") |
| 1286 | |
| 1287 | p := printer.NewPrinter(o) |
| 1288 | p.Print(&binary.ShiftRight{ |
| 1289 | Left: &expr.Variable{ |
| 1290 | VarName: &node.Identifier{Value: "a"}, |
| 1291 | }, |
| 1292 | Right: &expr.Variable{ |
| 1293 | VarName: &node.Identifier{Value: "b"}, |
| 1294 | }, |
| 1295 | }) |
| 1296 | |
| 1297 | expected := `$a>>$b` |
| 1298 | actual := o.String() |
| 1299 | |
| 1300 | if expected != actual { |
| 1301 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1302 | } |
| 1303 | } |
| 1304 | |
| 1305 | func TestPrinterPrintBinarySmallerOrEqual(t *testing.T) { |
| 1306 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…