(t *testing.T)
| 1476 | } |
| 1477 | |
| 1478 | func TestPrinterPrintUnset(t *testing.T) { |
| 1479 | o := bytes.NewBufferString("") |
| 1480 | |
| 1481 | p := printer.NewPrinter(o) |
| 1482 | p.Print(&cast.Unset{ |
| 1483 | Expr: &expr.Variable{ |
| 1484 | VarName: &node.Identifier{Value: "var"}, |
| 1485 | }, |
| 1486 | }) |
| 1487 | |
| 1488 | expected := `(unset)$var` |
| 1489 | actual := o.String() |
| 1490 | |
| 1491 | if expected != actual { |
| 1492 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1493 | } |
| 1494 | } |
| 1495 | |
| 1496 | // expr |
| 1497 |
nothing calls this directly
no test coverage detected
searching dependent graphs…