(t *testing.T)
| 1440 | } |
| 1441 | |
| 1442 | func TestPrinterPrintObject(t *testing.T) { |
| 1443 | o := bytes.NewBufferString("") |
| 1444 | |
| 1445 | p := printer.NewPrinter(o) |
| 1446 | p.Print(&cast.Object{ |
| 1447 | Expr: &expr.Variable{ |
| 1448 | VarName: &node.Identifier{Value: "var"}, |
| 1449 | }, |
| 1450 | }) |
| 1451 | |
| 1452 | expected := `(object)$var` |
| 1453 | actual := o.String() |
| 1454 | |
| 1455 | if expected != actual { |
| 1456 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1457 | } |
| 1458 | } |
| 1459 | |
| 1460 | func TestPrinterPrintString(t *testing.T) { |
| 1461 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…