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

Function TestPrintAssignBitwiseAnd

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

Source from the content-addressed store, hash-verified

448}
449
450func TestPrintAssignBitwiseAnd(t *testing.T) {
451 o := bytes.NewBufferString("")
452
453 p := printer.NewPrettyPrinter(o, " ")
454 p.Print(&assign.BitwiseAnd{
455 Variable: &expr.Variable{VarName: &node.Identifier{Value: "a"}},
456 Expression: &expr.Variable{VarName: &node.Identifier{Value: "b"}},
457 })
458
459 expected := `$a &= $b`
460 actual := o.String()
461
462 if expected != actual {
463 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
464 }
465}
466
467func TestPrintAssignBitwiseOr(t *testing.T) {
468 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…