(t *testing.T)
| 1404 | } |
| 1405 | |
| 1406 | func TestPrinterPrintDouble(t *testing.T) { |
| 1407 | o := bytes.NewBufferString("") |
| 1408 | |
| 1409 | p := printer.NewPrinter(o) |
| 1410 | p.Print(&cast.Double{ |
| 1411 | Expr: &expr.Variable{ |
| 1412 | VarName: &node.Identifier{Value: "var"}, |
| 1413 | }, |
| 1414 | }) |
| 1415 | |
| 1416 | expected := `(float)$var` |
| 1417 | actual := o.String() |
| 1418 | |
| 1419 | if expected != actual { |
| 1420 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1421 | } |
| 1422 | } |
| 1423 | |
| 1424 | func TestPrinterPrintInt(t *testing.T) { |
| 1425 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…