(t *testing.T)
| 1386 | } |
| 1387 | |
| 1388 | func TestPrinterPrintBool(t *testing.T) { |
| 1389 | o := bytes.NewBufferString("") |
| 1390 | |
| 1391 | p := printer.NewPrinter(o) |
| 1392 | p.Print(&cast.Bool{ |
| 1393 | Expr: &expr.Variable{ |
| 1394 | VarName: &node.Identifier{Value: "var"}, |
| 1395 | }, |
| 1396 | }) |
| 1397 | |
| 1398 | expected := `(boolean)$var` |
| 1399 | actual := o.String() |
| 1400 | |
| 1401 | if expected != actual { |
| 1402 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1403 | } |
| 1404 | } |
| 1405 | |
| 1406 | func TestPrinterPrintDouble(t *testing.T) { |
| 1407 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…