MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestPrinterPrintBool

Function TestPrinterPrintBool

printer/printer_test.go:1388–1404  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1386}
1387
1388func 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
1406func TestPrinterPrintDouble(t *testing.T) {
1407 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…