cast
(t *testing.T)
| 1115 | // cast |
| 1116 | |
| 1117 | func TestPrintArray(t *testing.T) { |
| 1118 | o := bytes.NewBufferString("") |
| 1119 | |
| 1120 | p := printer.NewPrettyPrinter(o, " ") |
| 1121 | p.Print(&cast.Array{ |
| 1122 | Expr: &expr.Variable{VarName: &node.Identifier{Value: "var"}}, |
| 1123 | }) |
| 1124 | |
| 1125 | expected := `(array)$var` |
| 1126 | actual := o.String() |
| 1127 | |
| 1128 | if expected != actual { |
| 1129 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1130 | } |
| 1131 | } |
| 1132 | |
| 1133 | func TestPrintBool(t *testing.T) { |
| 1134 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…