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

Function TestPrintExprBitwiseNot

printer/pretty_printer_test.go:1309–1323  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1307}
1308
1309func TestPrintExprBitwiseNot(t *testing.T) {
1310 o := bytes.NewBufferString("")
1311
1312 p := printer.NewPrettyPrinter(o, " ")
1313 p.Print(&expr.BitwiseNot{
1314 Expr: &expr.Variable{VarName: &node.Identifier{Value: "var"}},
1315 })
1316
1317 expected := `~$var`
1318 actual := o.String()
1319
1320 if expected != actual {
1321 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1322 }
1323}
1324
1325func TestPrintExprBooleanNot(t *testing.T) {
1326 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrettyPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…