(t *testing.T)
| 566 | } |
| 567 | |
| 568 | func TestPrinterPrintAssignBitwiseXor(t *testing.T) { |
| 569 | o := bytes.NewBufferString("") |
| 570 | |
| 571 | p := printer.NewPrinter(o) |
| 572 | p.Print(&assign.BitwiseXor{ |
| 573 | Variable: &expr.Variable{ |
| 574 | VarName: &node.Identifier{Value: "a"}, |
| 575 | }, |
| 576 | Expression: &expr.Variable{ |
| 577 | VarName: &node.Identifier{Value: "b"}, |
| 578 | }, |
| 579 | }) |
| 580 | |
| 581 | expected := `$a^=$b` |
| 582 | actual := o.String() |
| 583 | |
| 584 | if expected != actual { |
| 585 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | func TestPrinterPrintAssignCoalesce(t *testing.T) { |
| 590 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…