(t *testing.T)
| 1534 | } |
| 1535 | |
| 1536 | func TestPrinterPrintExprArrayItem(t *testing.T) { |
| 1537 | o := bytes.NewBufferString("") |
| 1538 | |
| 1539 | p := printer.NewPrinter(o) |
| 1540 | p.Print(&expr.ArrayItem{ |
| 1541 | Val: &expr.Reference{Variable: &expr.Variable{ |
| 1542 | VarName: &node.Identifier{Value: "world"}, |
| 1543 | }}, |
| 1544 | }) |
| 1545 | |
| 1546 | expected := `&$world` |
| 1547 | actual := o.String() |
| 1548 | |
| 1549 | if expected != actual { |
| 1550 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1551 | } |
| 1552 | } |
| 1553 | |
| 1554 | func TestPrinterPrintExprArrayItemUnpack(t *testing.T) { |
| 1555 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…