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

Function TestPrinterPrintBinaryBitwiseXor

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

Source from the content-addressed store, hash-verified

841}
842
843func TestPrinterPrintBinaryBitwiseXor(t *testing.T) {
844 o := bytes.NewBufferString("")
845
846 p := printer.NewPrinter(o)
847 p.Print(&binary.BitwiseXor{
848 Left: &expr.Variable{
849 VarName: &node.Identifier{Value: "a"},
850 },
851 Right: &expr.Variable{
852 VarName: &node.Identifier{Value: "b"},
853 },
854 })
855
856 expected := `$a^$b`
857 actual := o.String()
858
859 if expected != actual {
860 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
861 }
862}
863
864func TestPrinterPrintBinaryBooleanAnd(t *testing.T) {
865 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…