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

Function TestPrinterPrintBinaryBitwiseAnd

printer/printer_test.go:801–820  ·  view source on GitHub ↗

binary

(t *testing.T)

Source from the content-addressed store, hash-verified

799// binary
800
801func TestPrinterPrintBinaryBitwiseAnd(t *testing.T) {
802 o := bytes.NewBufferString("")
803
804 p := printer.NewPrinter(o)
805 p.Print(&binary.BitwiseAnd{
806 Left: &expr.Variable{
807 VarName: &node.Identifier{Value: "a"},
808 },
809 Right: &expr.Variable{
810 VarName: &node.Identifier{Value: "b"},
811 },
812 })
813
814 expected := `$a&$b`
815 actual := o.String()
816
817 if expected != actual {
818 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
819 }
820}
821
822func TestPrinterPrintBinaryBitwiseOr(t *testing.T) {
823 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…