(t *testing.T)
| 1422 | } |
| 1423 | |
| 1424 | func TestPrinterPrintInt(t *testing.T) { |
| 1425 | o := bytes.NewBufferString("") |
| 1426 | |
| 1427 | p := printer.NewPrinter(o) |
| 1428 | p.Print(&cast.Int{ |
| 1429 | Expr: &expr.Variable{ |
| 1430 | VarName: &node.Identifier{Value: "var"}, |
| 1431 | }, |
| 1432 | }) |
| 1433 | |
| 1434 | expected := `(integer)$var` |
| 1435 | actual := o.String() |
| 1436 | |
| 1437 | if expected != actual { |
| 1438 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1439 | } |
| 1440 | } |
| 1441 | |
| 1442 | func TestPrinterPrintObject(t *testing.T) { |
| 1443 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…