cast
(t *testing.T)
| 1368 | // cast |
| 1369 | |
| 1370 | func TestPrinterPrintArray(t *testing.T) { |
| 1371 | o := bytes.NewBufferString("") |
| 1372 | |
| 1373 | p := printer.NewPrinter(o) |
| 1374 | p.Print(&cast.Array{ |
| 1375 | Expr: &expr.Variable{ |
| 1376 | VarName: &node.Identifier{Value: "var"}, |
| 1377 | }, |
| 1378 | }) |
| 1379 | |
| 1380 | expected := `(array)$var` |
| 1381 | actual := o.String() |
| 1382 | |
| 1383 | if expected != actual { |
| 1384 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1385 | } |
| 1386 | } |
| 1387 | |
| 1388 | func TestPrinterPrintBool(t *testing.T) { |
| 1389 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…