(t *testing.T)
| 1552 | } |
| 1553 | |
| 1554 | func TestPrinterPrintExprArrayItemUnpack(t *testing.T) { |
| 1555 | o := bytes.NewBufferString("") |
| 1556 | |
| 1557 | p := printer.NewPrinter(o) |
| 1558 | p.Print(&expr.ArrayItem{ |
| 1559 | Unpack: true, |
| 1560 | Val: &expr.Variable{ |
| 1561 | VarName: &node.Identifier{Value: "world"}, |
| 1562 | }, |
| 1563 | }) |
| 1564 | |
| 1565 | expected := `...$world` |
| 1566 | actual := o.String() |
| 1567 | |
| 1568 | if expected != actual { |
| 1569 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1570 | } |
| 1571 | } |
| 1572 | |
| 1573 | func TestPrinterPrintExprArray(t *testing.T) { |
| 1574 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…