(t *testing.T)
| 503 | } |
| 504 | |
| 505 | func TestPrinterPrintReference(t *testing.T) { |
| 506 | o := bytes.NewBufferString("") |
| 507 | |
| 508 | p := printer.NewPrinter(o) |
| 509 | p.Print(&assign.Reference{ |
| 510 | Variable: &expr.Variable{ |
| 511 | VarName: &node.Identifier{Value: "a"}, |
| 512 | }, |
| 513 | Expression: &expr.Variable{ |
| 514 | VarName: &node.Identifier{Value: "b"}, |
| 515 | }, |
| 516 | }) |
| 517 | |
| 518 | expected := `$a=&$b` |
| 519 | actual := o.String() |
| 520 | |
| 521 | if expected != actual { |
| 522 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 523 | } |
| 524 | } |
| 525 | |
| 526 | func TestPrinterPrintAssignBitwiseAnd(t *testing.T) { |
| 527 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…