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

Function TestPrinterPrintExprBitwiseNot

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

Source from the content-addressed store, hash-verified

1605}
1606
1607func TestPrinterPrintExprBitwiseNot(t *testing.T) {
1608 o := bytes.NewBufferString("")
1609
1610 p := printer.NewPrinter(o)
1611 p.Print(&expr.BitwiseNot{
1612 Expr: &expr.Variable{
1613 VarName: &node.Identifier{Value: "var"},
1614 },
1615 })
1616
1617 expected := `~$var`
1618 actual := o.String()
1619
1620 if expected != actual {
1621 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1622 }
1623}
1624
1625func TestPrinterPrintExprBooleanNot(t *testing.T) {
1626 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…