(t *testing.T)
| 1263 | } |
| 1264 | |
| 1265 | func TestPrintExprArrayItem(t *testing.T) { |
| 1266 | o := bytes.NewBufferString("") |
| 1267 | |
| 1268 | p := printer.NewPrettyPrinter(o, " ") |
| 1269 | p.Print(&expr.ArrayItem{ |
| 1270 | Val: &expr.Reference{Variable: &expr.Variable{VarName: &node.Identifier{Value: "world"}}}, |
| 1271 | }) |
| 1272 | |
| 1273 | expected := `&$world` |
| 1274 | actual := o.String() |
| 1275 | |
| 1276 | if expected != actual { |
| 1277 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1278 | } |
| 1279 | } |
| 1280 | |
| 1281 | func TestPrintExprArray(t *testing.T) { |
| 1282 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…