(t *testing.T)
| 1163 | } |
| 1164 | |
| 1165 | func TestPrintInt(t *testing.T) { |
| 1166 | o := bytes.NewBufferString("") |
| 1167 | |
| 1168 | p := printer.NewPrettyPrinter(o, " ") |
| 1169 | p.Print(&cast.Int{ |
| 1170 | Expr: &expr.Variable{VarName: &node.Identifier{Value: "var"}}, |
| 1171 | }) |
| 1172 | |
| 1173 | expected := `(int)$var` |
| 1174 | actual := o.String() |
| 1175 | |
| 1176 | if expected != actual { |
| 1177 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1178 | } |
| 1179 | } |
| 1180 | |
| 1181 | func TestPrintObject(t *testing.T) { |
| 1182 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…